Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting multiple exporters via environmental variables #1755

Closed
pellared opened this issue Jun 10, 2021 · 4 comments · Fixed by #1758
Closed

Selecting multiple exporters via environmental variables #1755

pellared opened this issue Jun 10, 2021 · 4 comments · Fixed by #1758
Assignees
Labels
area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory spec:trace Related to the specification/trace directory

Comments

@pellared
Copy link
Member

pellared commented Jun 10, 2021

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 , via OTEL_TRACES_EXPORTER and OTEL_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 and OTEL_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 and OTEL_TRACES_EXPORTERS are specified then the "result" should be concatenated.

Example: if OTEL_TRACES_EXPORTER=jaeger and OTEL_TRACES_EXPORTERS=zipkin,otlp then we should add all 3 exporters.

@pellared pellared added the spec:trace Related to the specification/trace directory label Jun 10, 2021
@pellared
Copy link
Member Author

FYI @anuraaga @pjanotti

@arminru arminru added area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory labels Jun 10, 2021
@carlosalberto
Copy link
Contributor

I'd be up for the first approach. Certainly it won't work with old versions but we keep things simple. Also, adding more environment variables may create a lot of noise.

@ghost
Copy link

ghost commented Jun 10, 2021

Same as @carlosalberto with the first approach. Also, I've seen customer requests for this surfacing multiple times already, often to validate what's being sent with logger exporter.

@pellared
Copy link
Member Author

PR for first approach: #1758

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory spec:trace Related to the specification/trace directory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants