Skip to content

Commit 13f3a8c

Browse files
authoredSep 30, 2024
Merge pull request #24 from middleware-labs/apm-v2
quick fixes
2 parents 88b2df3 + 9d40426 commit 13f3a8c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎tracker/metrics.go

+4
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ func (t *Metrics) initMetrics(ctx context.Context, c *Config) error {
132132
}
133133

134134
c.Mp = &MeterProvider
135+
136+
if otel.GetMeterProvider() == nil {
137+
otel.SetMeterProvider(c.Mp)
138+
}
135139

136140
if !c.pauseDefaultMetrics {
137141
err := runtimemetrics.Start(runtimemetrics.WithMeterProvider(&MeterProvider))

0 commit comments

Comments
 (0)