Background
Currently StandaloneStarter only adds a single env common tag to the global registry. In multi-cluster deployments, it would be nice to have more flexible tagging at different levels.
Rough Idea
Introduce a metricsTags map at different levels, something like:
Process-level — global tags for all metrics in the process:
metricsTags:
region: gz
deployment: canary
Cluster-level — tags scoped to a specific host-cluster:
agent:
hostcluster:
metricsTags:
cluster: regional-a
cluster_scope: regional
Subservice propagation — cluster-level tags could also propagate to base-kv, base-rpc, etc.
Thoughts on Precedence
For the same key: process-level < cluster-level < metric-local tags. But this is open for discussion.
Possible Phases
This is quite a bit of scope, so it might make sense to phase it:
- Process-level
metricsTags
- Cluster-level
metricsTags under agent.hostcluster
- Propagation to base-cluster subservices
Would love to hear thoughts on whether this direction makes sense, and if the naming / precedence / phasing look reasonable.
Background
Currently
StandaloneStarteronly adds a singleenvcommon tag to the global registry. In multi-cluster deployments, it would be nice to have more flexible tagging at different levels.Rough Idea
Introduce a
metricsTagsmap at different levels, something like:Process-level — global tags for all metrics in the process:
Cluster-level — tags scoped to a specific host-cluster:
Subservice propagation — cluster-level tags could also propagate to
base-kv,base-rpc, etc.Thoughts on Precedence
For the same key: process-level < cluster-level < metric-local tags. But this is open for discussion.
Possible Phases
This is quite a bit of scope, so it might make sense to phase it:
metricsTagsmetricsTagsunderagent.hostclusterWould love to hear thoughts on whether this direction makes sense, and if the naming / precedence / phasing look reasonable.