Closed
Description
Currently, we don't auto-configure a LogRecordProcessor
/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 log record proccessor is configured by the user:
- use
OTEL_LOGS_EXPORTER
environment variable to determine an exporter and add it to theLoggerProvider
that's created byNodeSDK
- pair it up with a
BatchLogRecordProcessor
- see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#exporter-selection
- pair it up with a
- use the
OTEL_EXPORTER_OTLP_LOGS_PROTOCOL
to determine the OTLP exporter to use (http/json, http/protobuf, grpc) - use the
OTEL_EXPORTER_OTLP_PROTOCOL
env 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