-
Notifications
You must be signed in to change notification settings - Fork 264
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
support metric namespace #232
support metric namespace #232
Conversation
metrics.go
Outdated
func getNamespace(cfg *config.Config) string { | ||
namespace := "" | ||
if cfg.EnableMetricNamespace { | ||
namespace = "chproxy" |
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.
IMO, this field can be configurable. This chproxy
value can be the default. If someone needs to use a different value than the default, they will be able to set it in the config.
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.
Actually, I agree with you. Would it be better to use another option MetricNamespace string
?
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.
Or providing EnableMetricNamespace bool
and MetricNamespace string
together?
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.
Yes. I think so
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.
To confirm:
1)providing EnableMetricNamespace bool
and MetricNamespace string
combined
2) providing MetricNamespace string
only
Which option do you prefer? @sigua-cs
adding Namespace |
Hello @Nicholaswang , I reviewed the PR and tested it locally. Looks good. |
sure |
Description
support metric namespace option in config
Pull request type
Please check the type of change your PR introduces:
Checklist
Does this introduce a breaking change?