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
[Profiling] Add status API #96272
[Profiling] Add status API #96272
Conversation
With this commit we add a new REST API to the profiling plugin that allows to retrieve its current status.
Hi @danielmitterdorfer, I've created a changelog YAML for you. |
The API can be called as follows: {
"enabled" : true,
"active" : false,
"resources_created" : false
}
|
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.
No specific feedback about the code, which looks good.
My only comment so far is about the response and how a client would use it. For instance, given that resources_created
states whether all templates, indices, etc have been created, I can imagine that we may eventually want a way to capture additional resource states, such as "creation in-progress" or "creation failed".
Relatedly, is there an existing way for us to surface errors in the bootstrapping process to users via Kibana?
Thanks for the feedback. Due to the way this is handled in the underlying infrastructure it's not possible to surface errors (or show progress). However, I'd also argue that cases where it's not possible to create index templates are rather rare and that would warrant a support case. |
Just in case of future extensions and also for readability of the answer, I prefer more verbose keywords. Another option is to extend the JSON schema like (example, maybe over the top :))
|
@rockdaboot and I had a chat offline and came up with this response structure: {
"profiling": {
"enabled": true
},
"resource_management": {
"enabled": true
},
"resources": {
"created": true
}
} |
Pinging @elastic/profiling (Team:Universal Profiling) |
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.
LGTM
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 good 👍
With this commit we add a new REST API to the profiling plugin that allows to retrieve its current status.