Skip to content

Commit

Permalink
quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmarnell committed Nov 9, 2023
1 parent 3a27194 commit 4f98043
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmdutil/metrics/otel/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ func MustProvider(ctx context.Context, logger logrus.FieldLogger, cfg Config, se
// This provider is used for metrics reporting to the collector.
logger.WithField("metrics_destinations", strings.Join(cfg.MetricsDestinations, ",")).Info("setting up provider")

// for backwards compatibility prefer the CollectorURL over EndpointURL
endpoint := cfg.CollectorURL
// to allow transitioning between endpoints first check if the newer env is present
endpoint := cfg.EndpointURL
if endpoint == nil {
endpoint = cfg.EndpointURL
endpoint = cfg.CollectorURL
}

if endpoint == nil {
Expand Down

0 comments on commit 4f98043

Please sign in to comment.