mirror of
https://github.com/foomo/gofuncy.git
synced 2025-10-16 12:25:41 +00:00
fix: completed metric
This commit is contained in:
parent
1f73b4af65
commit
bfe5ae0d9d
2
go.go
2
go.go
@ -205,7 +205,7 @@ func Go(fn Func, opts ...Option) <-chan error {
|
|||||||
defer o.runningCounter.Add(ctx, -1, attrs)
|
defer o.runningCounter.Add(ctx, -1, attrs)
|
||||||
}
|
}
|
||||||
if o.completedCounter != nil {
|
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),
|
attribute.Bool("error", err != nil),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user