-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Use snake case for nodes stats/info metric names #53446
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
Use snake case for nodes stats/info metric names #53446
Conversation
The REST API uses "thread_pool" as the name of the thread pool metric. If we use this name internally when we serialize nodes stats and info requests, we won't need to do any fancy logic to check for and switch out "threadPool", which was the previous internal name.
|
Pinging @elastic/es-core-infra (:Core/Infra/Plugins) |
rjernst
left a comment
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.
Do we only need a constant change because this was accidentally modified in making the request contain a list of metrics?
|
@rjernst I wouldn't say anything was accidentally modified. Rather, I picked a list of strings to use for request serialization, and used the old method names to make the strings. In particular, In #53410 I'm trying to use these constants more widely and finding that I wish I had chosen them differently, but making the change breaks backwards compatibility with |
|
Another reason for making this change in isolation is that I want bwc tests to run cleanly on my next chunks of work. |
|
These string values are what users are able to pass in via the url, like |
|
@rjernst No, these aren't the user-facing strings. That is the change I am planning to make in #53410. The current state of I just ran Another way to think of this is that Here's the code that takes a metric name from the Rest request and sets the NodesInfoRequest: Line 115 in 9ad0597
And for Nodes Stats: Line 60 in 9ad0597
So you can see that the Metric enums aren't currently being used to translate between REST path parameters and As we discussed, the validation for these requests will probably move back to |
rjernst
left a comment
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.
Thanks for the explanation. LGTM.
The REST API uses "thread_pool" as the name of the thread pool metric. If we use this name internally when we serialize nodes stats and info requests, we won't need to do any fancy logic to check for and switch out "threadPool", which was the previous internal name.
* Use snake case for nodes stats/info metric names (#53446) The REST API uses "thread_pool" as the name of the thread pool metric. If we use this name internally when we serialize nodes stats and info requests, we won't need to do any fancy logic to check for and switch out "threadPool", which was the previous internal name.
|
Backported: #53535 |
The REST API uses "thread_pool" as the name of the thread pool metric. If we use this name internally when we serialize nodes stats and info requests, we won't need to do any fancy logic to check for and switch out "threadPool", which was the previous internal name.
I'm doing this in its own PR to isolate the amount of code for which I have to do a bwc-tests shuffle.
Relates #53410
Relates #52975