fix: completed metric

This commit is contained in:
Kevin Franklin Kim 2025-05-13 18:17:36 +02:00
parent 1f73b4af65
commit bfe5ae0d9d
No known key found for this signature in database

2
go.go
View File

@ -205,7 +205,7 @@ func Go(fn Func, opts ...Option) <-chan error {
defer o.runningCounter.Add(ctx, -1, attrs)
}
if o.completedCounter != nil {
defer o.runningCounter.Add(ctx, 1, attrs, metric.WithAttributes(
defer o.completedCounter.Add(ctx, 1, attrs, metric.WithAttributes(
attribute.Bool("error", err != nil),
))
}