This code uses a new preferred_vary_by_key to allow the SFX sink to prefer another tag as higher priority over an existing tag when choosing which client to tag on a metric.
Motivation
We want to create a mechanism by which we can update the SFX sink to use the new key, but in the event of failures, the existing vary_by key will be used.
Test plan
Added unit tests -- the tests preserve the original functionality if the key is absent.
Summary
This code uses a new preferred_vary_by_key to allow the SFX sink to prefer another tag as higher priority over an existing tag when choosing which client to tag on a metric.
Motivation
We want to create a mechanism by which we can update the SFX sink to use the new key, but in the event of failures, the existing vary_by key will be used.
Test plan
Added unit tests -- the tests preserve the original functionality if the key is absent.
Rollout/monitoring/revert plan
TBD