This changes the behavior of AddTags to prefer skipping over replacing when deduping.
Motivation
Some tags end up getting overwritten since the outgoing metric's tags collides with the ones specified in AddTags. This behavior of replacing can still be achieved by including the tags-to-replace as part of StripTags
Test plan
I updated the existing test cases to assert that if the tag was already on the metric, AddTags is not overriding it.
Summary
This changes the behavior of
AddTags
to prefer skipping over replacing when deduping.Motivation
Some tags end up getting overwritten since the outgoing metric's tags collides with the ones specified in
AddTags
. This behavior of replacing can still be achieved by including the tags-to-replace as part ofStripTags
Test plan
I updated the existing test cases to assert that if the tag was already on the metric, AddTags is not overriding it.
Rollout/monitoring/revert plan