cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.11k stars 3.81k forks source link

metrics,tracing: integrate prometheus exemplars (and connect metrics to traces) #83182

Open irfansharif opened 2 years ago

irfansharif commented 2 years ago

Is your feature request related to a problem? Please describe.

It would be very useful to be able to go from an interesting event/point-in-time as observed by metrics to a corresponding trace. Grafana for e.g. has an in-built trace-view now (replacing jaeger/zipkin), and with a bit of integration, lets you jump from an exemplar event as observed in your metrics charts to a corresponding trace. This article has more details and examples.

Describe the solution you'd like

Our tracing libraries are already OpenTelemetry-compatible (which is what makes them viewable through jaeger). And we already export our metrics through the prometheus format, so I assume there are 3rd-party libraries we can integrate with to export them in the OpenMetrics format that this exemplar machinery seems to want. What's left to do here perhaps is connecting some dots.

Jira issue: CRDB-16907

Epic CRDB-32402

irfansharif commented 2 years ago

Another possible benefit of integrating with prometheus exemplars: abusing it to build machinery for per-statement/replica/ metrics. I'm imaging the following:

github-actions[bot] commented 10 months ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!

irfansharif commented 10 months ago

+cc @dhartunian in case you want to keep this around.