Prometheus metric syntax: Difference between revisions
From wikinotes
Line 8: | Line 8: | ||
|- | |- | ||
| text-based || https://prometheus.io/docs/instrumenting/exposition_formats/#text-format-details | | text-based || https://prometheus.io/docs/instrumenting/exposition_formats/#text-format-details | ||
|- | |||
| metric types || https://prometheus.io/docs/concepts/metric_types/ | |||
|- | |||
|} | |} | ||
</blockquote><!-- Documentation --> | </blockquote><!-- Documentation --> |
Revision as of 16:57, 1 October 2022
Syntax used to expose metrics to prometheus.
Documentation
Comments
In addition to regular comments, doc-comments exist for
HELP
describing metricsTYPE
describing metric type# regular comment # HELP metric_name A description of the metric. # TYPE metric_name counter
Metrics
my_metric 1.2 my_metric{hostname="foobar", user="baz"} 1.2