[EXPORTER] OTLP/GRPC Exporter options for metrics/logs do not honor _METRICS_/_LOGS_ environment variables. #1845
Labels
area:exporter:otlp
OpenTelemetry Protocol (OTLP) Exporter
bug
Something isn't working
do-not-stale
spec-compliance
Not compliant to OpenTelemetry specs
Here,
example_otlp_metric_grpc
is expected to use environment variableOTEL_EXPORTER_OTLP_METRICS_ENDPOINT
.Instead, it uses environment variable
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
, as proven with the poisoned value set.The root cause is:
While this sounds like code reuse at first read, this inheritance is flawed:
_TRACES_
environment variables, instead of_METRICS_
Logs are also affected:
The options passed should be specific to the log signal, here the trace options are used instead.
OtlpGrpcExporterOptions
should really be renamed to avoid causing confusion here.The text was updated successfully, but these errors were encountered: