Skip to content

Commit

Permalink
fix: handle OTEL_SDK_DISABLE value correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
blumamir committed Oct 15, 2023
1 parent f16f26d commit 2398244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion otellogger.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewOtelZapCore() zapcore.Core {
func AttachToZapLogger(logger *zap.Logger) *zap.Logger {
otelSdlDisabled, defined := os.LookupEnv(otelSdkDisabled)
// do not register the otel zap core if user set OTEL_SDK_DISABLED=true
if defined && strings.ToLower(otelSdlDisabled) != "true" {
if defined && strings.ToLower(otelSdlDisabled) == "true" {
return logger
}

Expand Down

0 comments on commit 2398244

Please sign in to comment.