Repository navigation
Conversation
Add the default of each telemetry setting to its doc comment, in the spelling the YAML config uses, where the docs did not already state it. The rustdoc of these structs is also what `--generate` writes into generated config files, so the defaults show up there too. Also fix two stale references: the Open Telemetry link definition under TracesOutput was labelled "Jaeger Thrift (UDP)", so the link did not render, and reporter_bind_addr's docs and its address family error still named the pre-4.0 fields `jaeger_tracing_server_addr` and `jaeger_reporter_bind_addr`. Closes cloudflare#41 Assisted-by: Claude:claude-opus-5-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #41.
Adds the default of each telemetry setting to its doc comment where the docs did not already state it, in the spelling the YAML config uses (
terminal,text,INFO,metric_prefix,jaeger_thrift_udp,active). Settings that already said their default (max_queue_size, the OTLP and Jaeger output settings,sample_interval,track_all_spans) are left as they were, apart from rewording the Jaegernum_tasksdefault to match its neighbours. Each value comes from the field's#[serde(default = ...)]function or the type'sDefault, for exampleTelemetryServerSettingsdefaults to enabled on127.0.0.1:0, tracing defaults to enabled, andLivenessTrackingSettings::default()is disabled outside this crate's own tests.One default is worth calling out in the text:
max_events_per_seconddefaults to0, and both rate limiters skip the limit when it is0(NonZeroU32::new), soenabled: truealone does not limit anything.Since these doc comments are also what
-gwrites into generated config files, the defaults show up there too. I checked that withcargo run --example http_server -- -g. The checked-inexample_conf.yamlis hand-tuned (tracing disabled, OTLP output), so I did not regenerate it.Also fixes three stale references:
TracesOutput::OpenTelemetryGrpc, the link definition was labelled[Jaeger Thrift (UDP)], so[Open Telemetry]did not render as a link.reporter_bind_addrsaid it must match the address family ofjaeger_tracing_server_addr, the pre-4.0 field name. It now saysserver_addr.jaeger_tracing_server_addrandjaeger_reporter_bind_addr, which do not exist in 4.x configs. It now namesserver_addrandreporter_bind_addr.Checked:
rustfmt --check --edition 2024on all files, andcargo +nightly doc --lib --no-deps --all-features --document-private-itemswith the CIRUSTDOCFLAGS(-Dwarnings,foundations_docsrs) passes.Prepared with AI assistance (Claude); the checks above were run locally before opening.