@@ -27,9 +27,6 @@ const (
27
27
// envResourceAttrKey is the key for the environment variable value
28
28
// containing OpenTelemetry Resource attributes.
29
29
envResourceAttrKey = "OTEL_RESOURCE_ATTRIBUTES"
30
- // envTracesExportersKey is the key for the environment variable value
31
- // containing what OpenTelemetry trace exporter to use.
32
- envTracesExportersKey = "OTEL_TRACES_EXPORTER"
33
30
// envLogLevelKey is the key for the environment variable value containing
34
31
// the log level.
35
32
envLogLevelKey = "OTEL_LOG_LEVEL"
@@ -122,17 +119,9 @@ var (
122
119
func WithEnv () Option {
123
120
return fnOpt (func (ctx context.Context , c config ) (config , error ) {
124
121
var err error
125
- if _ , ok := lookupEnv (envTracesExportersKey ); ok {
126
- // Don't track the lookup value because autoexport does not provide
127
- // a way to just pass the environment value currently. Just use
128
- // NewSpanExporter which will re-read this value.
129
-
130
- var e error
131
- // NewSpanExporter will use an OTLP (HTTP/protobuf) exporter as the
132
- // default. This is the OTel recommended default.
133
- c .exporter , e = autoexport .NewSpanExporter (ctx )
134
- err = errors .Join (err , e )
135
- }
122
+ // NewSpanExporter will use an OTLP (HTTP/protobuf) exporter as the
123
+ // default. This is the OTel recommended default.
124
+ c .exporter , err = autoexport .NewSpanExporter (ctx )
136
125
137
126
c .resAttrs = append (c .resAttrs , lookupResourceData ()... )
138
127
0 commit comments