chore: update otel readme, plugin constructor#490
Conversation
|
|
||
| - `otel_trace_id`: 32-char hex trace identifier | ||
| - `otel_span_id`: 16-char hex span identifier | ||
| - `otel_trace_sampled`: boolean indicating if the trace is sampled |
There was a problem hiding this comment.
if the customer specifies th sampling ratio on the layer's env variable, will this be accurate?
There was a problem hiding this comment.
I guess this is for sample ratio, it's removed from the constructor
There was a problem hiding this comment.
since the sampled ratio was removed from constructor and we're relying on the ADOT's env variable to specify the sampler as well as the ratio of traces sampled (see here), I was curious whether this would actually work. Since the sampling_rate was still included in the constructor, I assume there was a time where the sampling decision was implemented within this plugin.
I think it would. Seems the log filter is logging this based on a variable in the span context which I think is set by the Sampler.
https://opentelemetry-python.readthedocs.io/en/stable/api/trace.html#opentelemetry.trace.TraceFlags
| | `OTEL_TRACES_SAMPLER` | Sampler to use (e.g., `traceidratio` for ratio-based sampling) | `always_on` | | ||
| | `OTEL_TRACES_SAMPLER_ARG` | Argument for the sampler (e.g., `0.3` to sample 30% of traces) | — | |
|
|
||
| - `otel_trace_id`: 32-char hex trace identifier | ||
| - `otel_span_id`: 16-char hex span identifier | ||
| - `otel_trace_sampled`: boolean indicating if the trace is sampled |
There was a problem hiding this comment.
since the sampled ratio was removed from constructor and we're relying on the ADOT's env variable to specify the sampler as well as the ratio of traces sampled (see here), I was curious whether this would actually work. Since the sampling_rate was still included in the constructor, I assume there was a time where the sampling decision was implemented within this plugin.
I think it would. Seems the log filter is logging this based on a variable in the span context which I think is set by the Sampler.
https://opentelemetry-python.readthedocs.io/en/stable/api/trace.html#opentelemetry.trace.TraceFlags
Issue #, if available:
Description of changes:
providerparameter as optionalBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.