[sdk-node] automatically configure metrics exporter based on enviornment variables #4551
Labels
needs:code-contribution
This feature/bug is ready to implement
pkg:sdk-node
triage:accepted
This feature has been accepted
type:feature
A feature with no sub-issues to address
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:
OTEL_METRICS_EXPORTER
environment variable to determine an exporter and add it to theMeterProvider
that's created byNodeSDK
PeriodicExportingMetricReader
if it is aPushMetricExporter
OTEL_EXPORTER_OTLP_METRICS_PROTOCOL
to determine the OTLP exporter to use (http/json, http/protobuf, grpc)OTEL_EXPORTER_OTLP_PROTOCOL
env var as a fallback to the above to determine the OTLP exporter to use (http/json, http/protobuf, grpc)The text was updated successfully, but these errors were encountered: