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
and refer to the user created ErrorLabels in #[metric] attributes and CounterVec<ErrorLabels>?
Hypocritical ask, because I commit the same sin myself in kube-derive, but I am painfully aware of how many people trip up on this (and it was my biggest stumbling block in measured because the errors all look so similar i start feeling dyslexic).
How
I don't know. Create the raw data type under the hood, and refer to by an associated type internally maybe?
The text was updated successfully, but these errors were encountered:
This is mostly an ergonomics request more than anything.
Current
rather than creating a struct, which derives a second hidden struct:
and force user to refer to hidden struct
ErrorLabelSet
in#[metric]
attrs and types alaCounterVec<ErrorLabelSet>
Proposed
is it possible to do some magic to have a hidden associated type internally so that we can just:
and refer to the user created
ErrorLabels
in#[metric]
attributes andCounterVec<ErrorLabels>
?Hypocritical ask, because I commit the same sin myself in kube-derive, but I am painfully aware of how many people trip up on this (and it was my biggest stumbling block in measured because the errors all look so similar i start feeling dyslexic).
How
I don't know. Create the raw data type under the hood, and refer to by an associated type internally maybe?
The text was updated successfully, but these errors were encountered: