You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to support observing exemplars on the default metrics, for instance to have trace IDs as exemplars.
We could add another function ExemplarFunc func(c *gin.Context) string to the Prometheus struct. If the function is non-nil, and the string it returns is non-nil, then the exemplar returned is used when incrementing and observing the request count, duration and sizes. This would enable having trace IDs as exemplars, which can make it simpler to connect metrics to traces.
It would be useful to support observing exemplars on the default metrics, for instance to have trace IDs as exemplars.
We could add another function
ExemplarFunc func(c *gin.Context) string
to thePrometheus
struct. If the function is non-nil, and the string it returns is non-nil, then the exemplar returned is used when incrementing and observing the request count, duration and sizes. This would enable having trace IDs as exemplars, which can make it simpler to connect metrics to traces.There is an implementation using exemplars at https://github.com/wei840222/gin-prometheus which is a bit less configurable.
The text was updated successfully, but these errors were encountered: