Skip to content

Add ability to *reset* metrics to 0 in UpDownCounter #3037

@haddasbronfman

Description

@haddasbronfman

What are you trying to achieve?

I need to set the metric db.client.connections.usage to 0.

What did you expect to see?

I expected to have a 'reset' function in the UpDownCounter object.

I'm working on the metric db.client.connections.usage in mysql in JS. The metric logic is such that each time a connection is created, acquired, released or end, I add +1 or -1 to the metric of used or idle connections.

Now I have a case where the user is having x used connections and y idle connections. and he is calling pool.end(). In this case, I want to reset both metrics (used & idle) to 0.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions