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
feat(histograms): static config for controlling timer/histogram emission (#7298)
Now that the basics are working: time to allow turning off timers.
Expected use is:
- leave things at default
- add a histogram version of a timer metric (i.e. deploy that code)
- verify new histogram metrics, migrate alerts and dashboards
- the timer data is now unused, so:
- set the timer's key to "histogram" to turn off its emission to save on
computation
- eventually it will be deleted from the source code (~months later)
- any keys explicitly set to "timer" or "both" will eventually error
when the timer is removed, to prevent missing alerts during the final
migration
- this is not yet implemented, but seems pretty easy. just check
contents against metrics definitions, metrics-defs tests show how.
- "histogram" or empty should not error, we can remove it later (and
force config files to remove the config then too)
And this can also disable histograms if e.g. cardinality is too high and
it causes problems: just set the key to "timer".
Hopefully this is not needed, but if jumping from "no histograms" to
"all timers migrated" in one shot it might be useful for gradual
migration / to reduce large blasts of new metrics.
---
I'd originally considered doing this in dynamic config, but I doubt
we'll need to make quick changes, and static config is significantly
less of a pain, both internally for Reasons™ and in code due to the
key-ID verbosity.
Unrelatedly: this PR is a near-ideal example of why dependency injection
frameworks are nice 😢
---------
Signed-off-by: Steven L <[email protected]>
// ShardDistribution is a config for the shard distributor leader election component that allows to run a single process per region and manage shard namespaces.
0 commit comments