File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ func WithExtraMethods(methods ...string) Option {
6666 })
6767}
6868
69- // WithExemplarFromContext adds allows to put a hook to all counter and histogram metrics.
70- // If the hook function returns non- nil labels, exemplars will be added for that request, otherwise metric
71- // will get instrumented without exemplar .
69+ // WithExemplarFromContext allows to inject function that will get exemplar from context that will be put to counter and histogram metrics.
70+ // If the function returns nil labels or the metric does not support exemplars, no exemplar will be added (noop), but
71+ // metric will continue to observe/increment .
7272func WithExemplarFromContext (getExemplarFn func (requestCtx context.Context ) prometheus.Labels ) Option {
7373 return optionApplyFunc (func (o * options ) {
7474 o .getExemplarFn = getExemplarFn
You can’t perform that action at this time.
0 commit comments