Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
grcevski committed Feb 21, 2025
1 parent 405fb7c commit 9320570
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/export/otel/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ func ReportMetrics(
if mr.cfg.SpanMetricsEnabled() || mr.cfg.ServiceGraphMetricsEnabled() {
hostMetrics := mr.newMetricsInstance(nil)
hostMeter := hostMetrics.provider.Meter(reporterName)
mr.setupHostInfoMeter(hostMeter)
err := mr.setupHostInfoMeter(hostMeter)
if err != nil {
return nil, fmt.Errorf("setting up host metrics: %w", err)
}
}

return mr.reportMetrics, nil
Expand Down
4 changes: 3 additions & 1 deletion pkg/export/prom/prom.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,9 @@ func (r *metricsReporter) observe(span *request.Span) {
}
t := span.Timings()
r.beylaInfo.WithLabelValues(span.Service.SDKLanguage.String()).metric.Set(1.0)
r.tracesHostInfo.WithLabelValues(r.hostID).metric.Set(1.0)
if r.cfg.SpanMetricsEnabled() || r.cfg.ServiceGraphMetricsEnabled() {
r.tracesHostInfo.WithLabelValues(r.hostID).metric.Set(1.0)
}
duration := t.End.Sub(t.RequestStart).Seconds()

targetInfoLabelValues := r.labelValuesTargetInfo(span.Service)
Expand Down

0 comments on commit 9320570

Please sign in to comment.