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] Report in status API if docs exist #102735
[Profiling] Report in status API if docs exist #102735
Conversation
With this commit we add a new field `has_data` to the profiling status API. This field is true iff there is at least one profiling event. As profiling events are the aggregate root in the profiling domain model, it is sufficient to check for presence of documents in that data stream.
Pinging @elastic/profiling (Team:Universal Profiling) |
Hi @danielmitterdorfer, I've created a changelog YAML for you. |
for (Index index : dataStream.getIndices()) { | ||
IndexMetadata meta = state.metadata().index(index); | ||
if (meta == null) { | ||
return 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.
What if there are many indices but only one doesn't have metadata? Should we not continue here?
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.
Fair point. I've pushed e11f4a8.
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
With this commit we add a new field `has_data` to the profiling status API. This field is true iff there is at least one profiling event. As profiling events are the aggregate root in the profiling domain model, it is sufficient to check for presence of documents in that data stream.
With this commit we add a new field
has_data
to the profiling status API. This field is true iff there is at least one profiling event. As profiling events are the aggregate root in the profiling domain model, it is sufficient to check for presence of documents in that data stream.