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
feat(prometheus): Add consumer metric data support #2469
Conversation
Signed-off-by: imjoey <majunjiev@gmail.com>
metrics.status = prometheus:counter("http_status", | ||
"HTTP status codes per service in APISIX", | ||
{"code", "route", "service", "node"}) | ||
{"code", "route", "service", "consumer", "node"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps more code comments are better for new comer just like me to understand codes :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liuxiran more detailed comment is added, thanks for your suggestions.
Signed-off-by: imjoey <majunjiev@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
Merge it now :) |
Signed-off-by: imjoey majunjiev@gmail.com
What this PR does / why we need it:
Fixes #2445 .
This PR is going to add
consumer
label for metric items. Based on this, we could trigger/send notifications to specified consumer when http status is unexpected, as well as get the estimated data about different consumers for several metrics.Pre-submission checklist: