You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compliance with metric name/TYPE standards improves operator/developer experience by enabling advanced features in Prometheus and related tools like promlens, Grafana, etc. Features such as context aware auto-complete / and PromQL linters.
Prometheus is unable to infer the type due to non compliance
Prometheus is able to infer the type
promtool has a linter for this
This tool compares the names and the types, but is not aware what the actual type is. Thus why #71 is suggested first.
nats_core_active_account_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_connection_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_core_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_gateway_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_gateway_inbound_msg_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_gateway_recv_msg_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_gateway_sent_msgs_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_recv_msgs_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_route_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_route_recv_msg_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_route_sent_msg_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_sent_msgs_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_slow_consumer_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_subs_count non-histogram and non-summary metrics should not have "_count" suffix
nats_core_total_connection_count non-histogram and non-summary metrics should not have "_count" suffix
nats_jetstream_advisory_count non-histogram and non-summary metrics should not have "_count" suffix
nats_latency_observations_count non-histogram and non-summary metrics should not have "_count" suffix
nats_survey_expected_count non-histogram and non-summary metrics should not have "_count" suffix
nats_survey_late_replies_count counter metrics should have "_total" suffix
nats_survey_late_replies_count non-histogram and non-summary metrics should not have "_count" suffix
nats_survey_no_replies_count counter metrics should have "_total" suffix
nats_survey_no_replies_count non-histogram and non-summary metrics should not have "_count" suffix
nats_survey_surveyed_count non-histogram and non-summary metrics should not have "_count" suffix
two other cases
nats_core_rtt_nanoseconds use base unit "seconds" instead of "nanoseconds"
nats_survey_nats_reconnects counter metrics should have "_total" suffix
Example counter metric: nats_core_total_connection_count
Example Scrape
# HELP nats_core_total_connection_count Total number of client connections serviced gauge
# TYPE nats_core_total_connection_count gauge
nats_core_total_connection_count{server_cluster="...",server_id="...",server_name="..."} 6345789
nats_core_total_connection_count counter metrics should have "_total" suffix
nats_core_total_connection_count non-histogram and non-summary metrics should not have "_count" suffix
Example "fixed" scrape
# HELP nats_core_total_connection_total Total number of client connections serviced counter
# TYPE nats_core_total_connection_total counter
nats_core_total_connection_total{server_cluster="...",server_id="...",server_name="..."} 42224222
The text was updated successfully, but these errors were encountered:
Conformance to Prometheus metric name standards.
Suggested Prerequisite: #71
Compliance with metric name/TYPE standards improves operator/developer experience by enabling advanced features in Prometheus and related tools like promlens, Grafana, etc. Features such as context aware auto-complete / and PromQL linters.
Prometheus is unable to infer the type due to non compliance
Prometheus is able to infer the type
promtool
has a linter for thisThis tool compares the names and the types, but is not aware what the actual type is. Thus why #71 is suggested first.
curl -sS localhost:7777/metrics | ./prometheus-2.32.1.linux-amd64/promtool check metrics
two other cases
Example
counter
metric:nats_core_total_connection_count
Example Scrape
Linter for
nats_core_total_connection_count
issue #71 will find this is a
counter
Two problems.
Example "fixed" scrape
The text was updated successfully, but these errors were encountered: