-
Notifications
You must be signed in to change notification settings - Fork 889
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
Allow selecting multiple exporters #1758
Conversation
Maybe totally straightforward, but I'd like to see a prototype of this in any language. |
I think the scenario in PR description @carlosalberto has a good suggestion. I think it will be trivial to implement in .NET, can you please demonstrate the implementation - issue open-telemetry/opentelemetry-dotnet#1453? |
@carlosalberto @SergeyKanzhelev
I do not think it is trivial. Especially in .NET as it has almost no support for env vars at the moment. References:
As a rule of thumb, I feel that the design should be similar to I have no idea what is the ETA for implementing open-telemetry/opentelemetry-dotnet#1453. However, I see no problem having this PR open until someone actually has time to implement it (in whatever language) 😉 |
For what it's worth, we implemented this for trace exporters in Java before the env var spec got finalized, at which point we pulled it back to a single exporter. It's a little tricky, however, since just specifying an exporter doesn't determine what span processor you might want to use. And, for a In the otel java instrumentation agent, we automatically add the logging exporter if the user enables |
Python already supports this exactly as proposed and it works quite well. https://github.com/open-telemetry/opentelemetry-python/blob/b3455cd1164f9c5f336cc26a52fb351cb422b0b2/opentelemetry-distro/src/opentelemetry/distro/__init__.py#L78-L82 |
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
@SergeyKanzhelev @jkwatson Python implement does not treat console or any other exporter as a special case. It always uses batch exporter. Ability to quickly add console exporter without removing a real exporter is already immensely useful even if the output is a bit delayed because of batching. I have not seen this cause any issues in practice. In fact it actually is quite nice since you can tell exactly when a remote exporter is supposed to export the spans. Besides, console exporter is not the only use case as this can be used to export to multiple remote exporters as well. IMO trying to specify multiple combinations of process+exporter via env vars will get too complex and we should expect users to setup such pipelines with code instead. |
From the Spec call yesterday: although supporting multiple tracer exporters is recurrent request, supporting multiple metrics exporters is not a clear thing (e.g. pull vs push based systems). Moreover, this is closely related to the effort by the new Instrumentation group/SIG so let's hold this a little bit for now, while we wait for such group to review it. |
Is there any problem to make them working "side-by-side"? I think that each concrete exporter should have its own set of environmental variables to configure it. |
It might not be a problem eventually, but it's certainly not something that is spec'd yet for the metrics SDK, so we shouldn't be providing any configuration for it, IMO. |
@carlosalberto suggested to wait for instrumentation group to pick this PR up. Thinking about it, this is a small adjustment that doesn't solve problems like different processors and things like this. Just a convenience improvement. So I'd vote to just accept this proposal. Unlikely it will block any sophisticated solution on telemetry pipelines configuration that instrumentation group will come up with. Thoughts? |
@SergeyKanzhelev and @carlosalberto I'm not sure how this belongs with an instrumentation group. Isn't this about SDK configuration? I would assume that many defaults will apply if I set |
I don't have any more concerns and @carlosalberto didn't repond for a while, I assume it's ok. Merging. |
* Allow selecting multiple exporters * Update CHANGELOG.md * Update CHANGELOG.md * Update specification/sdk-environment-variables.md Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
Fixes #1755
Changes
OTEL_TRACES_EXPORTER
andOTEL_METRICS_EXPORTER
by using a comma-separated list.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
.