Skip to content

Easy way to initialize counter vecs? #190

@beorn7

Description

@beorn7

See code like https://github.com/prometheus/prometheus/blob/b0adfea8d5e883cbab5c7e4113f8ea91f7cbc099/rules/manager.go#L75-L78 .

If you know in advance all the values each label can take, it is recommended to initialize all combinations so that each possible counter is exported with zero as a value.

This could be a utility function/method or be done somehow during construction.

This is a concern not specific to client_golang. Other client libraries usually have the same issue.

@fabxc @brian-brazil Feel free to comment…

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions