Does Grafana support Exemplars for Counter metrics?

  • What Grafana version and what operating system are you using?

  • What are you trying to achieve?
    I have been able to setup Exemplars together with Histogram metrics, using OpenTelemetry and Prometheus java-client
    According to the Prometheus java client Exemplars are supported for Histograms and Counter.

  • What happened?
    A query to curl -H 'Accept: application/openmetrics-text' http://localhost:13798/metrics show metrics and exemplars for both histogram and counter metrics:

network_messages_sent_total 189.0 # {TraceID="ebae601b51363107b1b67382bc5bf1e5"} 1.0 1639582848.184
network_peers_message_processing_duration_bucket{le="0.025"} 45.0 # {TraceID="79d999271fbca56dd081681d5a21c36a"} 0.0223181 1639582778.498

In Grafana I only see the Exemplars in the Histogram metrics, not in the counter metrics

  • What did you expect to happen?
    Exemplars available to counter metrics
    I was not able to find any documentation about what kind of metrics support Exemplars in Grafana, just that all examples are with histogram metrics

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

Exemplars with counter metrics are magically working today. I have been working on something different, still related with metrics. I have no idea why is working now.
It would be nice to update te Grafana documentation with information about Exemplars and Counters because this is not clarified and all examples are with Histograms