Handling "none" value in OTEL_PROPAGATORS, OTEL_TRACES_EXPORTER, OTEL_METRICS_EXPORTER and OTEL_LOGS_EXPORTER
What are you trying to achieve? I need to understand how SDK is supposed to behave if value "none" is specified together with other value(s) in any of the following environment variables:
- OTEL_PROPAGATORS
- OTEL_TRACES_EXPORTER
- OTEL_METRICS_EXPORTER
- OTEL_LOGS_EXPORTER
Additional context.
sdk-environment-variables.md file metions that value "none" indicates that no propagator or appropriate exporter should be configured. The issue is that these environment variables can hold a list of values. In current specification I did not find any information what should happen if for example OTEL_PROPAGATORS has value "baggage, none". I think such a specification would be worth adding.
In this case Java SDK throws an exception (see PropagatorConfiguration.java), but is it the right approach?
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
In this case Java SDK throws an exception (see PropagatorConfiguration.java), but is it the right approach?
I don’t think that’s the right approach. "none" should represent a no-op configuration instead of causing an error.
So to be clear - do you suggest that all propagators should be silently skipped if "none" is specified as one of the items in the propagator list ?
It is good that you are asking. For OTEL_PROPAGATORS=baggage,none the W3C Baggage Propagator is set. The none acts as a "NullValue".
It is good that you are asking. For
OTEL_PROPAGATORS=baggage,nonethe W3C Baggage Propagator is set. Thenoneacts as a "NullValue".
Java considers this an error because it doesn't make any sense, and probably means that the user has made a mistake in their env var setting.
I would tend to agree with the reasoning that having "none" among other propagators doesn't make sense and looks like a config mistake.
@robsunday, can you check how different languages are handling this already?