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

chore(prometheus): improve logging when having the inconsistent labels count #13020

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

git-hulk
Copy link
Contributor

@git-hulk git-hulk commented May 13, 2024

Summary

Currently, the Prometheus plugin will log the following error if we have encountered an inconsistent label count while debugging:

[error]... inconsistent labels count, expected 6, got 5

It's hard to identify which metric is going wrong, and it will be helpful if we can bring the metric name as well:

[error]... metric 'bandwidth_bytes' has the inconsistent labels count, expected 6, got 5

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

…s count

Currently, the prometheus plugin will log the following error if we have encountered
the inconsisent label count while debugging:

```
[error]... inconsistent labels count, expected 6, got 5
```

It's hard to identify which metric is going wrong, and it will be
helpful if we can bring the metric name as well:

```
[error]... metric 'bandwidth_bytes' has the inconsistent labels count, expected 6, got 5

```
@github-actions github-actions bot added plugins/prometheus cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels May 13, 2024
@windmgc windmgc requested a review from oowl May 13, 2024 08:28
@team-eng-enablement team-eng-enablement added the author/community PRs from the open-source community (not Kong Inc) label May 13, 2024
@git-hulk
Copy link
Contributor Author

@oowl Would you mind taking a look at this PR?

@git-hulk
Copy link
Contributor Author

Copy link
Member

@oowl oowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thx

@git-hulk
Copy link
Contributor Author

@chronolaw @StarlightIbuki could you help to take a look at this PR?

@git-hulk
Copy link
Contributor Author

git-hulk commented May 27, 2024

@chronolaw @oowl @StarlightIbuki, is this PR good to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author/community PRs from the open-source community (not Kong Inc) cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee plugins/prometheus size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants