From 7139e48e53de6fc0e52ecb149e20f94aa4e057bd Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Thu, 5 Oct 2023 22:50:06 +1100 Subject: [PATCH] fix: log when OTEL is exporting --- backend/common/observability/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/common/observability/client.go b/backend/common/observability/client.go index 9a70138b79..9e39302df8 100644 --- a/backend/common/observability/client.go +++ b/backend/common/observability/client.go @@ -2,6 +2,7 @@ package observability import ( "context" + "os" "strings" "github.com/alecthomas/errors" @@ -38,6 +39,8 @@ func Init(ctx context.Context, serviceName, serviceVersion string, config Config return nil } + logger.Infof("OTEL is enabled, exporting to %s", os.Getenv("OTEL_EXPORTER_OTLP_ENDPOINT")) + otelLogger := NewOtelLogger(logger, config.LogLevel) otel.SetLogger(otelLogger) otel.SetErrorHandler(otel.ErrorHandlerFunc(func(err error) { logger.Errorf(err, "OTEL") }))