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

OpenMetrics ignore_metrics documentation mismatch with behavior #9721

Closed
ottaviohartman opened this issue Jul 16, 2021 · 2 comments · Fixed by #9729
Closed

OpenMetrics ignore_metrics documentation mismatch with behavior #9721

ottaviohartman opened this issue Jul 16, 2021 · 2 comments · Fixed by #9729

Comments

@ottaviohartman
Copy link
Contributor

ottaviohartman commented Jul 16, 2021

#5759 added these examples to the openmetrics check conf.yaml:

    # ignore_metrics:
    #  - <IGNORED_METRIC_NAME>
    #  - <PREFIX_*>
    #  - <*_SUFFIX>
    #  - <PREFIX_*_SUFFIX>
    #  - <*_SUBSTRING_*>

However, the implementation uses fnmatch.translate (code here), which does not exactly work like the documentation says.

For example, the ignore_metric PREFIX_* would match both:

  • PREFIX_HELLO
  • THIS_IS_A_PREFIX_TOO

We came across this problem when trying to exclude high cardinality go_* metrics, while including argo_* metrics.

Steps to reproduce the issue:

  1. Set ignore_metrics in the openmetrics check to _* and any metrics with _ in them (not just those that start with _) will be ignored.

Describe the results you expected:

We expected the documentation to be the expected behavior.

I suppose either the documentation should be fixed or the implementation.

@ottaviohartman
Copy link
Contributor Author

cc @ahmed-mez for visibility

@ahmed-mez
Copy link
Contributor

Hey @omh1280 thanks for opening this issue, and sorry for the trouble!

Opened #9729 to address this. Thanks!

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 a pull request may close this issue.

2 participants