mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-26 01:39:26 +00:00
node: default OpenTelemetry sample ratio to 1.0
The --rpc.telemetry.sample-ratio CLI flag declares a default of 1.0, but cmd/utils.setOpenTelemetry only copies the flag value into the node config when ctx.IsSet returns true. Without a corresponding default on node.DefaultConfig.OpenTelemetry.SampleRatio, omitting the flag leaves the runtime ratio at the float64 zero value, which causes sdktrace.TraceIDRatioBased(0) to drop 100% of spans. Users see "OpenTelemetry trace export enabled" but no traces ever leave geth. Seed the default in DefaultConfig so the documented behavior matches runtime behavior.
This commit is contained in:
parent
726d657a4a
commit
e1f7baeeb9
1 changed files with 3 additions and 0 deletions
|
|
@ -76,6 +76,9 @@ var DefaultConfig = Config{
|
|||
DiscoveryV5: true,
|
||||
},
|
||||
DBEngine: "", // Use whatever exists, will default to Pebble if non-existent and supported
|
||||
OpenTelemetry: OpenTelemetryConfig{
|
||||
SampleRatio: 1.0,
|
||||
},
|
||||
}
|
||||
|
||||
// DefaultDataDir is the default data directory to use for the databases and other
|
||||
|
|
|
|||
Loading…
Reference in a new issue