opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

Configure OTLP metrics exporter with environment variables

Open legendecas opened this issue 2 years ago • 2 comments

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.

legendecas avatar Aug 24 '22 03:08 legendecas

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

dyladan avatar Aug 31 '22 13:08 dyladan

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

legendecas avatar Aug 31 '22 13:08 legendecas

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

  • OTEL_EXPORTER_OTLP_METRICS_COMPRESSION (currently the trace setting is used instead)
  • OTEL_EXPORTER_OTLP_METRICS_INSECURE (currently the trace setting is used instead)
  • OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE (currently the trace setting is used instead)
  • OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY (currently the trace setting is used instead)
  • OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE (currently the trace setting is used instead)

pichlermarc avatar Oct 11 '22 09:10 pichlermarc

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.

github-actions[bot] avatar Jan 16 '23 06:01 github-actions[bot]

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 avatar Jan 16 '23 09:01 pichlermarc

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

pichlermarc avatar Mar 14 '23 15:03 pichlermarc