go-http-metrics icon indicating copy to clipboard operation
go-http-metrics copied to clipboard

Support custom labels

Open sashayakovtseva opened this issue 4 years ago • 3 comments

Hello @slok,

I've added custom labels support for my project and now I see that this may be the solution for #47. Also did tiny tests cleanup during my work.

Custom labels are supported for prometheus as this is the collector I personally use. However, new functionality does not break previous implementation of Recorder and anyone can add custom labels support for any existing recorder.

FastHTTP example is also provided.

Hope this PR help someone.

sashayakovtseva avatar Jun 17 '21 17:06 sashayakovtseva

Hey @slok, would you take a look at this PR please?

sashayakovtseva avatar Feb 05 '22 18:02 sashayakovtseva

Hi @sashayakovtseva

Thanks for the PR, sorry I missed this one.

I don't know if we want to implement this in the library as today, dynamic labels are tricky and could have undesired side effects.

For now, I would like to park this feature and think a bit more.

Also, we have this other PR #74 that implements a similar feature.

slok avatar Feb 11 '22 16:02 slok

This PR was opened before #74

sashayakovtseva avatar Feb 14 '22 21:02 sashayakovtseva