mirror of
https://github.com/nais/wonderwall.git
synced 2026-05-06 08:27:10 +00:00
fix(otel): disable internal logs from otel libraries
These logs are often seen only due to timeouts, connection errors or other downstream errors, which aren't actionable as consumers.
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/nais/wonderwall/pkg/config"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/uptrace/opentelemetry-go-extra/otellogrus"
|
||||
@@ -42,6 +43,9 @@ func Setup(ctx context.Context, cfg *config.Config) (func(context.Context), erro
|
||||
otel.SetTracerProvider(tracerProvider)
|
||||
tracer = tracerProvider.Tracer(cfg.OpenTelemetry.ServiceName)
|
||||
|
||||
// Disable internal otel logs as we don't care about them.
|
||||
otel.SetLogger(logr.Discard())
|
||||
|
||||
log.Debug("opentelemetry: initialized configuration")
|
||||
shutdown := func(ctx context.Context) {
|
||||
if err := tracerProvider.Shutdown(ctx); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user