-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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(plugin) Adjust Prometheus to be the reference Impl for metrics #8712
Conversation
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.
This is mostly LGTM. @fffonion Could you do another review as well, please.
f47c76a
to
f2df285
Compare
When we are renaming metrics, should we take this as chance to compliant with Prometheus as suggested by #8237? |
d3132ff
to
885ca1e
Compare
45a0a87
to
b0663b3
Compare
1282612
to
5061c16
Compare
082ec0b
to
4309b9f
Compare
Code LGTM, let's make sure this is recorded in changelog (https://github.com/Kong/kong/blob/master/CHANGELOG.md#plugins) especially to mention the breaking changes. |
4309b9f
to
a7e93d8
Compare
78db8c7
to
7c09bc4
Compare
- Rework and Upgrade Prometheus Plugins Metrics and Labels - fix(prometheus) move total out of current_connections metrics and - create new nginx_{http,stream}_total_requests
- metric naming - metric source naming
7c09bc4
to
7ce286e
Compare
7ce286e
to
b619f75
Compare
I fixed an error in the session_latency_ms to remove tcp (as it also covers UDP). |
Rework and Upgrade Prometheus Plugins Metrics and Labels.
Summary
These Prometheus plugin will be the first class citizen for metrics collection in Kong 3.0 and beyond. This patch attempts to lay foundation for a good set of base metrics+labels, that can also be expanded upon in later releases
Full changelog
kong_latency_ms
,upstream_latency_ms
andrequest_latency_ms
(http) /tcp_session_duration_ms
(stream). Buckets details below.consumer_status
removed.request_count
andconsumer_status
have been merged into justhttp_requests_total
. If theper_consumer
config is set false, theconsumer
label will be empty. If theper_consumer
config is true, it will be filled.http_requests_total
has a new labelsource
. set to eitherexit
,error
orservice
. https://docs.konghq.com/gateway/latest/pdk/kong.response/#kongresponseget_sourcenode_info
. Single gauge set to 1 that outputs the node's id and kong version.node_id
nginx_http_current_connections
merged withnginx_stream_current_connection
tonginx_current_connections