You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If both are set, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT will take precedence.
This actually says when we apply both OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_TRACES_ENDPOINT at the same time, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT will take precedence.
But this description is confusing, as it is after the sentence "If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT environment variable is set, and this option is not passed, that variable value will be used.". Users might figure the env would take precedence when both the option and the env for the same feature are set.
Proposed Solution
Correct the statement mentioned above to prevent confusion.
Based on the current implementation, we should state that if users apply both options and envs for the same feature, options will take precedence.
Complement tests for this situation to secure exporters' behavior if there is none.
The text was updated successfully, but these errors were encountered:
Problem Statement
Comments on options of exporters didn't specify the situation where both option and env are set. For instance,
opentelemetry-go/exporters/otlp/otlptrace/otlptracehttp/options.go
Lines 80 to 99 in 14441ae
This actually says when we apply both
OTEL_EXPORTER_OTLP_ENDPOINT
andOTEL_EXPORTER_OTLP_TRACES_ENDPOINT
at the same time,OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
will take precedence.But this description is confusing, as it is after the sentence "If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT environment variable is set, and this option is not passed, that variable value will be used.". Users might figure the env would take precedence when both the option and the env for the same feature are set.
Proposed Solution
The text was updated successfully, but these errors were encountered: