From 3a469968047e6cf82ffe899f3e6fbbd72ff52085 Mon Sep 17 00:00:00 2001 From: Cedric Kienzler Date: Wed, 22 Feb 2023 22:55:27 +0100 Subject: [PATCH] modify OTLP init logic --- pkg/observability/opentelemetry.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/observability/opentelemetry.go b/pkg/observability/opentelemetry.go index 626acca..506f213 100644 --- a/pkg/observability/opentelemetry.go +++ b/pkg/observability/opentelemetry.go @@ -30,6 +30,9 @@ func InitTracer(serviceName, serviceVersion string) (*sdkTrace.TracerProvider, t if strings.ToLower(otlpInsecure) == "true" { otlpOptions = append(otlpOptions, otlptracehttp.WithInsecure()) } + } else { + otlpOptions = append(otlpOptions, otlptracehttp.WithEndpoint("localhost:4318")) + otlpOptions = append(otlpOptions, otlptracehttp.WithInsecure()) } client := otlptracehttp.NewClient(otlpOptions...)