-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support the OTEL_TRACES_EXPORTER environment variable #2310
Comments
@MrAlias , moving to the https://pkg.go.dev/plugin requires that applications ship with cgo enabled since it depends on the c method Is it permissible to have environment variable defined, but only consumed if the application developer adds in the exporter explicitly? for example: import (
otel/sdk
otel/exporter
_ otel/exporter/zipkin // registering global init method to allow for zipkin exporter
)
// Carrying on, start the SDK and have a valid, configured zipkin exporter import (
otel/sdk
otel/exporter
_ otel/exporter/otlp
)
// zipkin var is present but no zipkin exporter configured |
I see it as the best approach as
https://pkg.go.dev/plugin is rather a no-go as it does even not work on all platforms. I find it also not suitable for this use case. FYI this is something I plan to do in .NET SDK: open-telemetry/opentelemetry-dotnet#1453 (comment) |
I know myself and few others have toyed with idea of connivence libs to effectively meet the same goal. An example to help get me get started quicker is https://github.com/MovieStoreGuy/otel-go-starter/tree/main.
Just to double check what you mean, are you meaning that there is no tightly coupled code inside the sdk? |
I mean "we should only include the required exporter code (say .../pkg/zipkin) when explicitly asked to". |
Should be resolved by open-telemetry/opentelemetry-go-contrib#2753 |
I think that the env var should be supported by the SDK ( Reference: open-telemetry/opentelemetry-specification#3721 (comment) |
Closing per open-telemetry/opentelemetry-specification#3730 |
Add support for the
OTEL_TRACES_EXPORTER
environment variable as defined in the specification.This will require designing and ratifying a plan to support loading all the exporters we need without having the SDK import them all. As was mentioned here we could look at the https://pkg.go.dev/plugin package. Or, as was suggested in a SIG meeting, look into maybe some registration method similar to the
database/sql
package.It might also be the case that we do not want to ultimately support this. Part of this issue is determining the feasibility and appropriateness of this configuration option.
Part of #1698
The text was updated successfully, but these errors were encountered: