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
{{ message }}
Repository navigation
counter/histogram with enabledExemplars=true, the labels() function does not bind the input parameters properly #777
There's a performance issue here since labels() should be able to validate the label values and then not repeat them. Likely what needs to happen is the two paths need to be unwound or converted into a set of file scoped functions that result in the correct output, sort of like how observe() does. That would both address the issue here and provide an incentive to use the labels() function to reduce overhead per call.
This code is exactly duplicated into Histogram and has the exact same bug.
changed the title [-]For a counter with enabledExemplars=true, the `labels` function does not work properly[/-][+]For a counter/histogram with enabledExemplars=true, the `labels` function does not work properly[/+]on Jul 13, 2026
I believe the right way to solve this is to modify labels() to skip over revalidation of inputs for those that cannot change rather than using bind the way it is at the moment.
Those changes should also result in the internals of observe() and inc being homogenized so that side-by-side comparison of the files shows the way that histogram exemplars and counter exemplars are identical or different. So that any subsequent additions to this code are easier to reason about.
For these reasons I'm putting myself as the assignee.
changed the title [-]For a counter/histogram with enabledExemplars=true, the `labels` function does not work properly[/-][+]counter/histogram with enabledExemplars=true, the `labels` function does not bind the input parameters properly[/+]on Jul 13, 2026
changed the title [-]counter/histogram with enabledExemplars=true, the `labels` function does not bind the input parameters properly[/-][+]counter/histogram with enabledExemplars=true, the `labels()` function does not bind the input parameters properly[/+]on Jul 13, 2026
Activity
[-]For a counter with enabledExemplars=true, the `labels` function does not work properly[/-][+]For a counter/histogram with enabledExemplars=true, the `labels` function does not work properly[/+]jdmarshall commentedon Jul 13, 2026
I believe the right way to solve this is to modify
labels()to skip over revalidation of inputs for those that cannot change rather than using bind the way it is at the moment.Those changes should also result in the internals of
observe()andincbeing homogenized so that side-by-side comparison of the files shows the way that histogram exemplars and counter exemplars are identical or different. So that any subsequent additions to this code are easier to reason about.For these reasons I'm putting myself as the assignee.
[-]For a counter/histogram with enabledExemplars=true, the `labels` function does not work properly[/-][+]counter/histogram with enabledExemplars=true, the `labels` function does not bind the input parameters properly[/+][-]counter/histogram with enabledExemplars=true, the `labels` function does not bind the input parameters properly[/-][+]counter/histogram with enabledExemplars=true, the `labels()` function does not bind the input parameters properly[/+]jdmarshall commentedon Jul 13, 2026
I'm not planning to implement #407, but I might be able to make it less difficult for someone else to do so.