-
Notifications
You must be signed in to change notification settings - Fork 989
Closed
Labels
needs:code-contributionThis feature/bug is ready to implementThis feature/bug is ready to implementpkg:sdk-nodetriage:acceptedThis feature has been acceptedThis feature has been acceptedtype:featureA feature with no sub-issues to addressA feature with no sub-issues to address
Description
Currently, we don't auto-configure a MetricReader/exporter combination when using the @opentelemetry/sdk-node package.
Goal of this issue is to implement exporter selection for metrics based on this specification:
For this issue to be considered done we need to implement the following behavior:
If no metric reader is configured by the user:
- use
OTEL_METRICS_EXPORTERenvironment variable to determine an exporter and add it to theMeterProviderthat's created byNodeSDK- pair it up with a
PeriodicExportingMetricReaderif it is aPushMetricExporter - see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#exporter-selection
- for now, do NOT set up a
MeterProviderifOTEL_METRICS_EXPORTERis unset, any current code-only configuration should continue to work as it does now. If ametricReaderis already provided by the user, do NOT override or add an additional reader based on the contents ofOTEL_METRICS_EXPORTER
- pair it up with a
- use the
OTEL_EXPORTER_OTLP_METRICS_PROTOCOLto determine the OTLP exporter to use (http/json, http/protobuf, grpc) - use the
OTEL_EXPORTER_OTLP_PROTOCOLenv var as a fallback to the above to determine the OTLP exporter to use (http/json, http/protobuf, grpc) - fallback to using http/protobuf if none of the two protocol env vars are set
zacps, aabmass, sladkoff, sjparkinson and szyhab
Metadata
Metadata
Assignees
Labels
needs:code-contributionThis feature/bug is ready to implementThis feature/bug is ready to implementpkg:sdk-nodetriage:acceptedThis feature has been acceptedThis feature has been acceptedtype:featureA feature with no sub-issues to addressA feature with no sub-issues to address