Selecting multiple exporters via environmental variables #1755
Labels
area:sdk
Related to the SDK
spec:metrics
Related to the specification/metrics directory
spec:trace
Related to the specification/trace directory
What are you trying to achieve?
The exporter selection environmental variables allow only to select a SINGLE one. It would be handy to allow selecting more than one e.g.
otlp,console
.Additional context
An issue where multiple exporters were also mentioned:
Possible solutions
Allow adding more than one exporter
We can allow adding multiple exporters separated by
,
viaOTEL_TRACES_EXPORTER
andOTEL_METRICS_EXPORTER
.The only problem is that it is not a forward-compatible change. However, it is backward-compatible.
Example:
OTEL_TRACES_EXPORTER=zipkin,otlp
Add new env vars
We can add new
OTEL_TRACES_EXPORTERS
andOTEL_METRICS_EXPORTERS
env vars which could contain a comma-separated list of exporters.This change is forward-compatible, however, it makes the API/specs longer. Moreover e,.g. if both
OTEL_TRACES_EXPORTER
andOTEL_TRACES_EXPORTERS
are specified then the "result" should be concatenated.Example: if
OTEL_TRACES_EXPORTER=jaeger
andOTEL_TRACES_EXPORTERS=zipkin,otlp
then we should add all 3 exporters.The text was updated successfully, but these errors were encountered: