-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
embed: enable extensive metrics if specified #9108
Conversation
@@ -523,6 +523,10 @@ func (e *Etcd) serveClients() (err error) { | |||
} | |||
|
|||
func (e *Etcd) serveMetrics() (err error) { | |||
if e.cfg.Metrics == "extensive" { |
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.
@Quentin-M can you define this as a const? now extensive
string is used at two places.
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 it seems that https://github.com/coreos/etcd/blob/2fb972847346d838b7395d9b5305ad45c124ff1b/etcdmain/etcd.go#L182 can be removed?
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.
Aren't those two independent mains / code paths? One for standalone etcd and one for embed. That was my understanding anyways. I noticed that the histograms were not available in the embed case, so made that PR.
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.
binary one with main is a wrapper around embed one: see https://github.com/coreos/etcd/blob/2fb972847346d838b7395d9b5305ad45c124ff1b/etcdmain/etcd.go#L181-L186
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.
Ooooh I am blind as a monkey.. I should have used my brain for that PR.
CI failed with
|
Sorry about that, forgot to stage the import. |
@Quentin-M have you manually tested it again for both binary and embed case(we do not have test coverage on this one from automated test yet unfortunately)? If yes, then LGTM. |
Binary
Embed
|
@xiang90 Sure, will backport/release next week. |
fyi, only backport to 3.3, since 3.2 doesn't support metrics URLs |
hello @gyuho , I am using the 3.3.10 cluster, but I don't see the ‘grpc_server_handling_seconds_bucket’ indicator in https://etcd.readthedocs.io/en/latest/operate.html#v3-3
|
@marksuger did you set the flag --metrics=extensive: https://github.com/etcd-io/etcd/blob/efd1fc634b58a629903990e605f2cb9d5633706d/Documentation/op-guide/configuration.md#--metrics? |
@wenjiaswe |
Following up on #7030.
The
extensive
metrics were only enabled for the binary form of etcd, and not when using the embed server. This PR alleviate exactly this.