Skip to content
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

Extract script and script cache stats from nodes stats into separate API #95394

Closed
dakrone opened this issue Apr 19, 2023 · 8 comments · Fixed by #96613
Closed

Extract script and script cache stats from nodes stats into separate API #95394

dakrone opened this issue Apr 19, 2023 · 8 comments · Fixed by #96613
Assignees
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache :Data Management/Stats Statistics tracking and retrieval APIs >enhancement Team:Core/Infra Meta label for core/infra team Team:Data Management Meta label for data/management team

Comments

@dakrone
Copy link
Member

dakrone commented Apr 19, 2023

Description

From the nodes stats API, we should extract the script and/or script_cache (they appear to present the same information) stats into their own endpoint. This endpoint can then be non-node-centric, and present a global view of the number of script compilations, cache hits/misses, and so on.

@dakrone dakrone added >enhancement :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache :Data Management/Stats Statistics tracking and retrieval APIs labels Apr 19, 2023
@elasticsearchmachine elasticsearchmachine added Team:Core/Infra Meta label for core/infra team Team:Data Management Meta label for data/management team labels Apr 19, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@HiDAl
Copy link
Contributor

HiDAl commented Jun 6, 2023

Hey @dakrone and @mattc58

checking the classes for scriptCacheStats, it seems to be deprecated since 2 years ago. Even, we don't have documentation for it https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html. And apparently, we never had that documentation. Should we create the target script_cache? or would suffice with script? thanks

@dakrone
Copy link
Member Author

dakrone commented Jun 6, 2023

@HiDAl when I looked I believe they carry the same information, so we should go with the non-deprecated one.

@rjernst
Copy link
Member

rjernst commented Jun 6, 2023

@stu-elastic can you give more context on the deprecated stats?

@dakrone Even if moving the stats out of node stats, they would still be per node. So such a new API would have to present stats for the entire cluster (collecting from each node and aggregating) right? I guess that is not different than node stats currently (at least by default without passing a node id)?

@stu-elastic
Copy link
Contributor

@stu-elastic can you give more context on the deprecated stats?

They are when we, for a few versions, had per-context stats and per-context rate limiting

We deprecated per-context rate limiting because users found it confusing and instead ensured no system scripts (like ingest) were not rate limited.

script_cache is around for back compat reasons, script should be used.

@dakrone
Copy link
Member Author

dakrone commented Jun 6, 2023

@dakrone Even if moving the stats out of node stats, they would still be per node. So such a new API would have to present stats for the entire cluster (collecting from each node and aggregating) right? I guess that is not different than node stats currently (at least by default without passing a node id)?

Yes, that's correct, these stats would be aggregated and for the entire cluster, not per-node.

@HiDAl
Copy link
Contributor

HiDAl commented Jun 6, 2023

@rjernst yes, we're doing this for all the stats that we're migrating

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache :Data Management/Stats Statistics tracking and retrieval APIs >enhancement Team:Core/Infra Meta label for core/infra team Team:Data Management Meta label for data/management team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants