8000 Merge pull request #934 from prometheus/update-exemplar-docs · JustinJohnsonK/client_python@4b28834 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4b28834

Browse files
author
Julien Pivotto
authored
Merge pull request prometheus#934 from prometheus/update-exemplar-docs
Add documentation for how to export exemplars
2 parents 3724a8a + 742b8b2 commit 4b28834

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,20 @@ h = Histogram('request_latency_seconds', 'Description of histogram')
252252
h.observe(4.7, {'trace_id': 'abc123'})
253253
```
254254

255+
Exemplars are only rendered in the OpenMetrics exposition format. If using the
256+
HTTP server or apps in this library, content negotiation can be used to specify
257+
OpenMetrics (which is done by default in Prometheus). Otherwise it will be
258+
necessary to use `generate_latest` from
259+
`prometheus_client.openmetrics.exposition` to view exemplars.
260+
261+
To view exemplars in Prometheus it is also necessary to enable the the
262+
exemplar-storage feature flag:
263+
```
264+
--enable-feature=exemplar-storage
265+
```
266+
Additional information is available in [the Prometheus
267+
documentation](https://prometheus.io/docs/prometheus/latest/feature_flags/#exemplars-storage).
268+
255269
### Disabling `_created` metrics
256270

257271
By default counters, histograms, and summaries export an additional series

0 commit comments

Comments
 (0)
0