Skip to content

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Nov 1, 2024

Follow-up on #115994 to add telemetry for the total number of documents and size in bytes of logsdb indices.

Relates #115994

@dnhatn dnhatn force-pushed the logsdb-usage-stats branch from 5afaf6d to cb90135 Compare November 2, 2024 01:04
@dnhatn dnhatn changed the title Index mode stats Add num docs and size to logsdb telemetry Nov 2, 2024
@dnhatn dnhatn added the :StorageEngine/Logs You know, for Logs label Nov 2, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @dnhatn, I've created a changelog YAML for you.

@dnhatn dnhatn marked this pull request as ready for review November 2, 2024 15:23
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

Thanks Nhat. I left two comments.

}

public static class IndexStats implements Writeable {
private long numDocs;
Copy link
Member

Choose a reason for hiding this comment

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

make fields final?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fields need to be non-final for the add method, which combines stats across shards and nodes.

}

@Override
protected NodeResponse nodeOperation(NodeRequest request, Task task) {
Copy link
Member

Choose a reason for hiding this comment

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

Do you think there is an easy way to reuse the logic in IndicesStatsCache#internalGetIndicesStats()? I think it is the same logic.

I suspect we don't want the caching behaviour that IndicesMetrics has (because this should be invoked often), otherwise we could think of reusing it.

Copy link
Member Author

Choose a reason for hiding this comment

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

++ I pushed 650c7b7

@dnhatn dnhatn requested a review from martijnvg November 4, 2024 19:50
@dnhatn dnhatn added the auto-backport Automatically create backport pull requests when merged label Nov 4, 2024
@dnhatn
Copy link
Member Author

dnhatn commented Nov 5, 2024

@martijnvg This is ready again. Can you please take another look? Thank you!

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM - thanks Nhat!

@dnhatn
Copy link
Member Author

dnhatn commented Nov 5, 2024

Thanks Martijn!

@dnhatn dnhatn merged commit fa6c529 into elastic:main Nov 5, 2024
16 checks passed
@dnhatn dnhatn deleted the logsdb-usage-stats branch November 5, 2024 16:46
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request Nov 5, 2024
Follow-up on elastic#115994 to add telemetry for the total number of documents 
and size in bytes of logsdb indices.

Relates elastic#115994
dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request Nov 5, 2024
Follow-up on elastic#115994 to add telemetry for the total number of documents
and size in bytes of logsdb indices.

Relates elastic#115994
dnhatn added a commit that referenced this pull request Nov 7, 2024
Follow-up on #115994 to add telemetry for the total number of documents
and size in bytes of logsdb indices.

Relates #115994
jozala pushed a commit that referenced this pull request Nov 13, 2024
Follow-up on #115994 to add telemetry for the total number of documents 
and size in bytes of logsdb indices.

Relates #115994
alexey-ivanov-es pushed a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Nov 28, 2024
Follow-up on elastic#115994 to add telemetry for the total number of documents 
and size in bytes of logsdb indices.

Relates elastic#115994
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >enhancement :StorageEngine/Logs You know, for Logs Team:StorageEngine v8.17.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants