element-hq / element-hq/synapse

Consider adding exemplars to metrics

Open
#15,927 0 comments 0 reactions 0 assignees View on GitHub
O-Uncommon S-Minor T-Enhancement Z-Dev-Wishlist
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#15927](https://github.com/matrix-org/synapse/issues/15927).

---

c.f. https://grafana.com/docs/grafana/latest/fundamentals/exemplars/

These allow you to send up "examples" of various metrics, that can be rendered on graphs (with links to jaeger).

This requires opt-in in both prometheus (via a feature flag), and grafana in the data source and graph settings.

I'm not sure if we want to a) do this by default, or b) make it optional. I don't know how Prometheus handles exemplars if they're not enabled, and how older versions handle it (certainly prometheus fails to parse the metrics if you don't use the right openmetrics content type for the response)

I've got a WIP branch at https://github.com/matrix-org/synapse/compare/erikj/exemplars, with a screen shot below of it working.

![Screenshot from 2023-07-12 15-51-43](https://github.com/matrix-org/synapse/assets/8428120/8b5155e7-eb05-4721-8c01-45ae4d5373a6)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.