kong icon indicating copy to clipboard operation
kong copied to clipboard

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

Open git-hulk opened this issue 1 year ago • 4 comments

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

git-hulk avatar May 13 '24 08:05 git-hulk

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

git-hulk avatar May 14 '24 10:05 git-hulk

https://github.com/Kong/kong/actions/runs/9072858739/job/24943120249?pr=13020#step:20:2126 The CI failure is not related to this PR.

git-hulk avatar May 14 '24 13:05 git-hulk

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

git-hulk avatar May 15 '24 11:05 git-hulk

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

git-hulk avatar May 27 '24 05:05 git-hulk

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

git-hulk avatar May 31 '24 09:05 git-hulk

@git-hulk Thanks for your contribution!

ADD-SP avatar Jun 04 '24 03:06 ADD-SP

Successfully created cherry-pick PR for master:

  • https://github.com/kong/kong-ee/pull/9361

team-gateway-bot avatar Jun 04 '24 03:06 team-gateway-bot

@ADD-SP Thank you!

git-hulk avatar Jun 04 '24 03:06 git-hulk