From 0c4351f69b8e33fdcfcaaa20d8d2954c19172785 Mon Sep 17 00:00:00 2001 From: William Date: Tue, 20 Aug 2024 12:08:51 +0100 Subject: [PATCH] fix(otel): send traces to localhost over http for now --- internal/infrastructure/otel/provider.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/infrastructure/otel/provider.go b/internal/infrastructure/otel/provider.go index b24b4eb..f6c0ff1 100644 --- a/internal/infrastructure/otel/provider.go +++ b/internal/infrastructure/otel/provider.go @@ -30,7 +30,12 @@ func NewProviders(serviceName string) (*Providers, func(), error) { ctx := context.Background() - otlpExporter, err := otlptracehttp.New(ctx) + otlpExporter, err := otlptracehttp.New(ctx, + // send this to a local otel collector for now, allow overrides later + otlptracehttp.WithEndpoint("http://localhost:4318"), + // we are presuming this happens over a service mesh or locally on the node etc + otlptracehttp.WithInsecure(), + ) if err != nil { return nil, nil, fmt.Errorf("failed to create the otlp exporter: %w", err) }