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

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

Merged
merged 3 commits into from
Jun 4, 2024

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

…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?

@git-hulk
Copy link
Contributor Author

@ADD-SP Would you mind having a look at this PR?

@ADD-SP ADD-SP changed the title chore(prometheus): improve logging when having the inconsistent labels count refactor(prometheus): improve logging when having the inconsistent labels count Jun 3, 2024
@git-hulk git-hulk requested a review from ADD-SP June 3, 2024 09:26
@ADD-SP ADD-SP changed the title refactor(prometheus): improve logging when having the inconsistent labels count fix(prometheus): improve logging when having the inconsistent labels count Jun 4, 2024
@ADD-SP
Copy link
Contributor

ADD-SP commented Jun 4, 2024

@git-hulk Thanks for your contribution!

@ADD-SP ADD-SP merged commit f46a957 into Kong:master Jun 4, 2024
27 checks passed
@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

@git-hulk
Copy link
Contributor Author

git-hulk commented Jun 4, 2024

@ADD-SP Thank you!

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.

6 participants