diff --git a/internal/tracing/docker_context.go b/internal/tracing/docker_context.go index 19b9ac21f..6e0c0217d 100644 --- a/internal/tracing/docker_context.go +++ b/internal/tracing/docker_context.go @@ -94,6 +94,10 @@ func ConfigFromDockerContext(st store.Store, name string) (OTLPConfig, error) { case map[string]interface{}: otelCfg = m[otelConfigFieldName] } + if otelCfg == nil { + return OTLPConfig{}, nil + } + otelMap, ok := otelCfg.(map[string]interface{}) if !ok { return OTLPConfig{}, fmt.Errorf( diff --git a/internal/tracing/mux.go b/internal/tracing/mux.go index c52f548a3..ad5cd1b2e 100644 --- a/internal/tracing/mux.go +++ b/internal/tracing/mux.go @@ -18,7 +18,6 @@ package tracing import ( "context" - "log" "github.com/hashicorp/go-multierror" sdktrace "go.opentelemetry.io/otel/sdk/trace" @@ -36,10 +35,7 @@ func (m MuxExporter) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlyS return exporter.ExportSpans(ctx, spans) }) } - if err := eg.Wait(); err != nil { - log.Fatal(err) - } - return nil + return eg.Wait() } func (m MuxExporter) Shutdown(ctx context.Context) error {