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

Check if metrics are available for corresponding alert rules #16

Open
DnPlas opened this issue Jun 25, 2024 · 1 comment
Open

Check if metrics are available for corresponding alert rules #16

DnPlas opened this issue Jun 25, 2024 · 1 comment

Comments

@DnPlas
Copy link

DnPlas commented Jun 25, 2024

Enhancement Proposal

It would be interesting if this tool could verify if a charm with a set of alert rules is actually exposing the metrics those alert rules refer to.
This can be specially useful in the following cases:

  • If the metric name changes
  • If the metric is removed entirely, but the charm author did not remove the alert rule
  • If the metric even exists
@sed-i
Copy link
Contributor

sed-i commented Jun 25, 2024

Agreed. cos-tool would then need to be able to extract metric names from alert rules.

Just realized there could be some minor edge cases that may affect testing:

  • When it comes to labels, some instrumentations have conditional metrics, e.g. api latency per path, and if the particular api endpoint wasn't probed yet, then the metric with the corresponding "path" label wouldn't exist.
  • Also related are aggregation operators: it would be difficult to make test assertion that the labels used by aggregation operators actually exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants