open-telemetry / opentelemetry-js

OpenTelemetry JavaScript Client
https://opentelemetry.io
Apache License 2.0
2.67k stars 768 forks source link

Configure OTLP metrics exporter with environment variables #3193

Open legendecas opened 2 years ago

legendecas commented 2 years ago

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md

OTLP exporter spec defines that the OTLP exporter should be automatically configured with a PeriodicMetricReader when using OTEL_METRICS_EXPORTER. Their aggregation and temporality preferences should also be configured with OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE and OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION.

dyladan commented 2 years ago

I saw you added this to the metrics GA milestone. Do you believe this is blocking the metrics SDK?

legendecas commented 2 years ago

No, I believe it's not blocking but rather good to have.

pichlermarc commented 1 year ago

Just went through the code and saw that the following env-vars from this spec are also not implemented right now:

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

pichlermarc commented 1 year ago

Not stale as we'd need to implement OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION after #3506 lands. :slightly_smiling_face: (we also need to address the comment I made earlier)

pichlermarc commented 1 year ago

When this is done, we'll also need to update the spec compliance matrix with the newly supported env vars.