Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Deprecate gauge metrics named like counters #12744

Closed
@dannykopping

Description

@dannykopping

coderd_oauth2_external_requests_rate_limit_total and coderd_api_workspace_latest_build_total are both gauges, but use the _total suffix which is usually used to indicate a counter, as described by the prometheus documentation on naming.

While this is not strictly a problem, it may lead to users incorrectly assuming they can perform aggregations on these metrics rather than just using their current value; aggregations such as rate on gauges make no sense.

I'd suggest that we deprecate these metric names, export another metric without the _total suffix alongside them, and mark the original metrics for removal in the next major release. IMHO metrics are part of the API surface, and therefore should be treated in a semver-observant manner.

Metadata

Metadata

Assignees

Labels

good first issueEasily solved issues suitable for starters and community contributors

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions