Skip to content

Commit

Permalink
Pass opts to otlpmetrichttp.New() (#304)
Browse files Browse the repository at this point in the history
opts was created but never used. It's necessary to pass opts the otlpmetrichttp.New() so that the configured destinationEnpoint is correctly used.
  • Loading branch information
scrohde authored Oct 18, 2024
1 parent ad53170 commit 22263c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/examples/agent/agent/metricreporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func NewMetricReporter(
opts = append(opts, otlpmetrichttp.WithInsecure())
}

metricExporter, err := otlpmetrichttp.New(context.Background())
metricExporter, err := otlpmetrichttp.New(context.Background(), opts...)
if err != nil {
err := fmt.Errorf("failed to initialize stdoutmetric export pipeline: %v", err)
return nil, err
Expand Down

0 comments on commit 22263c7

Please sign in to comment.