NH-66126 Exporter defaults based on configured protocol #310
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this PR, metrics and traces exporter defaults depended on is_lambda (see #217).
After this PR, the defaults don't depend on lambda. They instead depend on
OTEL_EXPORTER_OTLP_PROTOCOL
which we require for otlp exporting in any environment.If Protocol is
http/protobuf
:OTEL_METRICS_EXPORTER
defaults to otlp_proto_httpOTEL_TRACES_EXPORTER
defaults to otlp_proto_httpIf Protocol is
grpc
:OTEL_METRICS_EXPORTER
defaults to otlp_proto_grpcOTEL_TRACES_EXPORTER
defaults to otlp_proto_grpcIf Protocol is anything else or unset:
OTEL_METRICS_EXPORTER
. User must configure metrics exporters else none will initialize.OTEL_TRACES_EXPORTER
defaults to solarwinds_exporterNote that the above are for default values. Any combination of env vars to specify protocol, exporter, endpoint will still be respected.
This does deviate from the Otel default distro, which uses otlp_proto_grpc by default.
We now start packaging otlp_proto_grpc with our layer to better match Otel's layer and because export by grpc is available and working and the default for Otel Python.