open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.74k stars 887 forks source link

Metric aggregation env variables are only for OTLP Exporter #4248

Open cijothomas opened 3 weeks ago

cijothomas commented 3 weeks ago

What are you trying to achieve? Trying to influence Metric aggregation temporality, aggregation for histograms when using non-otlp exporting.

What did you expect to see?

A MeterProvider/MetricReader env variable to control the same. However, the existing env variables are tied to OTLP Exporter only, and does not work when other exporting is used: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md#additional-environment-variable-configuration

I think these variables should be respected by the SDK (after changing the name to remove "OTLP" from them).

cijothomas commented 3 weeks ago

https://github.com/open-telemetry/opentelemetry-specification/pull/4246#issuecomment-2399841927

pellared commented 2 weeks ago

I think it is better to have the _OTLP_ and also other exporters would also have its own _[NAME]_ as it would allow better granularity when multiple exporters are used.

Moreover, the current env vars are stable.

Therefore, I would rather propose defining equivalent env vars for other exporters than removing _OTLP_.