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

[Profiling] Report in status API if docs exist #102735

Merged
merged 3 commits into from Nov 29, 2023

Conversation

danielmitterdorfer
Copy link
Member

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.
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/profiling (Team:Universal Profiling)

@elasticsearchmachine
Copy link
Collaborator

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;
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

@rockdaboot rockdaboot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danielmitterdorfer danielmitterdorfer merged commit e93bc7c into elastic:main Nov 29, 2023
14 checks passed
@danielmitterdorfer danielmitterdorfer deleted the docs-count-check branch November 29, 2023 12:12
timgrein pushed a commit to timgrein/elasticsearch that referenced this pull request Nov 30, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :UniversalProfiling/Application Elastic Universal Profiling REST APIs and infrastructure v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants