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
The tail-sampling processor should refuse policies with duplicate names. Otherwise, the telemetry it generates becomes ambiguous, or incorrect.
While we (me and @jmsnll) were trying to work out a solution internally (to see the various output of the metric), we realized a potential bug in that the tail sampler does not check for uniqueness in the policy name. More concretely, if we use a config as below, where someone accidentally use identical name for two different policies
which is true as per the config but deceiving to anyone without looking at the config. As the label is taken from the policy context in stats.RecordWithTags and there is no check during the initial unmarshal, we can in theory give every single policy the same name which result in the metric being incorrect. This issue with non-unique policy name remains regardless of whether this issue is fixed (and may have wider impact).
One would argue that no engineer should make the mistake of having non-unique policy name. However, if a new (silence) tag say final-decision is introduced, it may clash with a config that is using that exact policy name final-decision. I am not sure how likely this scenario is but I thought it is worth flagging as we have already made that mistake ourselves.
The tail-sampling processor should refuse policies with duplicate names. Otherwise, the telemetry it generates becomes ambiguous, or incorrect.
then firing off 100 traces with
STATUS_CODE_UNSET
result inwhich is true as per the config but deceiving to anyone without looking at the config. As the label is taken from the policy context in
stats.RecordWithTags
and there is no check during the initial unmarshal, we can in theory give every single policy the same name which result in the metric being incorrect. This issue with non-unique policy name remains regardless of whether this issue is fixed (and may have wider impact).One would argue that no engineer should make the mistake of having non-unique policy name. However, if a new (silence) tag say
final-decision
is introduced, it may clash with a config that is using that exact policy namefinal-decision
. I am not sure how likely this scenario is but I thought it is worth flagging as we have already made that mistake ourselves.Originally posted by @edwintye in #25882 (comment)
The text was updated successfully, but these errors were encountered: