Fix ctx bug
This commit is contained in:
parent
6db2ca713a
commit
b41c344d03
@ -165,7 +165,7 @@ var token int64 = 0
|
|||||||
|
|
||||||
func RegisterRLMetrics(ctx context.Context) {
|
func RegisterRLMetrics(ctx context.Context) {
|
||||||
twonce.Do(func() {
|
twonce.Do(func() {
|
||||||
cb := func(_ context.Context, o metric.Observer) error {
|
cb := func(ctx context.Context, o metric.Observer) error {
|
||||||
token += int64(ctxLimiter(ctx).Tokens())
|
token += int64(ctxLimiter(ctx).Tokens())
|
||||||
o.ObserveInt64(events.RLGauge, token)
|
o.ObserveInt64(events.RLGauge, token)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user