-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add OTEL_SAMPLING_PROBABILITY env variable definition #1117
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -9,7 +9,8 @@ The goal of this specification is to unify the environment variable names betwee | |||||
| OTEL_RESOURCE_ATTRIBUTES | Key-value pairs to be used as resource attributes | | See [Resource SDK](./resource/sdk.md#specifying-resource-information-via-an-environment-variable) for more details. | | ||||||
| OTEL_LOG_LEVEL | Log level used by the SDK logger | "info" | | | ||||||
| OTEL_PROPAGATORS | Propagators to be used as a comma separated list | "tracecontext,baggage" | Values MUST be deduplicated in order to register a `Propagator` only once. Unrecognized values MUST generate a warning and be gracefully ignored. | | ||||||
| OTEL_TRACE_SAMPLER | Sampler to be used for traces | "parentbased_always_on" | See [Sampling](./trace/sdk.md#sampling) | | ||||||
| OTEL_TRACE_SAMPLER | Sampler to be used for traces | "parentbased_always_on" | See [Sampling](./trace/sdk.md#sampling) | | ||||||
| OTEL_TRACE_SAMPLING_PROBABILITY| Sampling probability, a number in the [0..1] range, e.g. 0.25| 1 | | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we have two variables we need to document what happens when e.g. OTEL_TRACE_SAMPLING_PROBABILITY is set but OTEL_TRACE_SAMPLER is not set (should the documented default parentbased_always_on be used or should it "smartly" use traceidratio? Or if it is explicitly set to something else than traceidratio or parentbased_traceidratio. Alternatively, we might consider having only one variable with a bit more complex values like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we say There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or What if the tracer is configured in code? Should it somehow pick up the value? I guess not. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Oberon00 If I understood correctly, this is a value used mostly for auto-instrumentation, at least for now (similar to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If that is the intention, it should be documented. I would not be surprised if some SDKs respond to these environment variables out of the box. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This was not mentioned anywhere that this is only for auto-instrumentation. I was planning to make SDK (.NET), respond to these env variables by default. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This is functionality that auto-instrumentation can use, I agree, but it's functionality that I want for manual instrumentation too. I think of making every SDK implement these variables for configuring manual instrumentation is a post-GA item, something covered by the so-called "distros" or "launchers" that give you an easy way to install the SDK configured by the environment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The convention in the Jaeger SDKs is:
One downside of this configuration mechanism is that it must accounts for a number of optional features and, as a result, forces all dependencies to be included. E.g. in Java we have several modules (core, thrift, zipkin, etc.), and a top-level There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sounds good to me. For now the only components required to support this would be auto-instrumentation components. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name should be
Suggested change
to match the name The current name has no obvious connection to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I support this renaming. The intention for this environment variable is to configure only the traceidratio sampler, as I see it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 |
||||||
|
||||||
Known values for OTEL_PROPAGATORS are: "tracecontext", "baggage", "b3", "jaeger". | ||||||
Additional values can be specified in the respective SDK's documentation, in case third party `Propagator`s are supported, such as "xray" or "ottracer". | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what the default value means here, as discussed in #985. Is this the default to be used if sampler is
traceidratio
?