opentelemetry-go
                                
                                 opentelemetry-go copied to clipboard
                                
                                    opentelemetry-go copied to clipboard
                            
                            
                            
                        Support OTEL_SDK_DISABLED environment variable.
Problem Statement
https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md#environment-variables says go library not support OTEL_SDK_DISABLED environment. Do we have a plan to support it ?
We will indeed need to implement it, as it's specified. Feel free to let us know if you want to start working on it, or just to open a PR.
I don't think this is worth added to the Go implementation. It was added to the specification for languages that may come with auto-instrumented code. The Go implementation requires a user to explicitly setup a tracer provider and then register or directly use it. I don't see much value to adding this, at least not at this stage in the project.
I don't think this is worth added to the Go implementation. It was added to the specification for languages that may come with auto-instrumented code. The Go implementation requires a user to explicitly setup a tracer provider and then register or directly use it. I don't see much value to adding this, at least not at this stage in the project.
- It may be still useful for the users so that it could be used as a "feature-toggle" to disable OTel code
- How would we want to support it in https://github.com/open-telemetry/opentelemetry-go-instrumentation?
We will indeed need to implement it, as it's specified.
All configuration via environment variables is optional. There is no requirement that we support it.
I think I'm with @MrAlias on this, for now. It's not required and can be implemented in a relatively straightforward manner by an application author that finds it necessary by wrapping their SDK initialization in a check of the environment variable. Adding it to the configuration surface area of the SDK is a one-way door that I don't think we need to walk through right now, but we should keep it open to evaluate at a later time.