Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrics: initialize counters with 0 value #14

Merged
merged 1 commit into from
Apr 29, 2021
Merged

Conversation

ribbybibby
Copy link
Contributor

The increase() function won't recognise a move from no value -> 1 as an increase, which means it's possible for alerts to miss events.

To address this, initialize every possible set of labels for each counter with a 0 value.

The semaphore_policy_sync_queue_full_failures and semaphore_policy_sync_requeue CounterVecs were using the names of networksets as labels, which has an almost unbounded possible list of potential values which we obviously can't initialize ahead of time.

I've decided to remove the label because:

  1. It has the potential for high cardinality
  2. I don't think it's necessarily important information for either metric. I'm not sure if we'd expect requeueing to be networkset specific or if we'd want to split alerts by networkset.
  3. If we do have an issue with a specific networkset, that information will be in the logs.

The increase() function  won't recognise a move from no value -> 1
as an increase, which means it's possible for alerts to miss events.

To address this, initialize every possible set of labels for each
counter with a 0 value.

The `semaphore_policy_sync_queue_full_failures` and
`semaphore_policy_sync_requeue` CounterVecs were using the names of
networksets as labels, which has an almost unbounded possible list of
potential values which we obviously can't initialize ahead of time.

I've decided to remove the label because:
1. It has the potential for high cardinality
2. I don't think it's necessarily important information for either
   metric. I'm not sure if we'd expect issues with requeueing to be
   networkset specific or if we'd want to split alerts by networkset.
3. If we do have an issue with a specific networkset, that information
   will be in the logs.
@ribbybibby ribbybibby merged commit fd6c388 into main Apr 29, 2021
@ribbybibby ribbybibby deleted the metrics-init-counters branch April 29, 2021 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants