Skip to content

Commit

Permalink
Fix crash if only application_service_graph feature is enabled (1.5 b…
Browse files Browse the repository at this point in the history
…ackport) (#808)
  • Loading branch information
mariomac authored May 8, 2024
1 parent 72af6c9 commit 165a71c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/internal/export/otel/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ func (mr *MetricsReporter) setupGraphMeters(m *Metrics, meter instrument.Meter)
return fmt.Errorf("creating service graph total: %w", err)
}

if m.tracesTargetInfo == nil {
m.tracesTargetInfo, err = meter.Int64UpDownCounter(TracesTargetInfo)
if err != nil {
return fmt.Errorf("creating service graph traces target info: %w", err)
}
}

return nil
}

Expand Down

0 comments on commit 165a71c

Please sign in to comment.