-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add common tags for stats backends that support it #7651
Conversation
Signed-off-by: crowu <[email protected]>
Signed-off-by: crowu <[email protected]>
Signed-off-by: crowu <[email protected]>
Signed-off-by: crowu <[email protected]>
@deepthi sorry for the ping - would you mind taking a look when you get a chance? Thanks! :-) |
Signed-off-by: crowu <[email protected]>
Signed-off-by: crowu <[email protected]>
Signed-off-by: crowu <[email protected]>
Gentle reminder :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me.
One question: why did you decide to extract out InitWithoutServenv
? I don't see it being called outside servenv.OnRun
.
I extract it out so that it is possible to reuse stats in other Vitess components that does not set up |
@@ -46,6 +46,9 @@ var statsBackend = flag.String("stats_backend", "", "The name of the registered | |||
var combineDimensions = flag.String("stats_combine_dimensions", "", `List of dimensions to be combined into a single "all" value in exported stats vars`) | |||
var dropVariables = flag.String("stats_drop_variables", "", `Variables to be dropped from the list of exported variables.`) | |||
|
|||
// CommonTags is a comma-separated list of common tags for stats backends | |||
var CommonTags = flag.String("stats_common_tags", "", `Comma-separated list of common tags for the stats backend. It provides both label and values. Example: label1:value1,label2:value2`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this should use flagutil.StringMapValue
Description
Opentsdb and statsd both support common tags that can be attached to all the metrics we emitted. They are useful to identify the latency at keyspace or shard level. However there is no easy way to integrate with that.
This PR does 2 things:
InitWithoutServenv
so that we can init them without servenv. This can be useful to reuse the stats backend on other binaries that does not use servenv (e.g., vtorc, vtbench)Related Issue(s)
Checklist
Deployment Notes
Impacted Areas in Vitess
Components that this PR will affect: