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

add metric: docappender.blocked.add counter #219

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

endorama
Copy link
Member

This monotonic counter increments every time Appender.Add
detects that bulkItems channel length and capacity are
equal before sending the created BulkIndexerItem to the
channel.

As bulkItems is a buffered channel, monitoring length and
capacity allow us to detect possible blocking events when
sending to the channel due to exhausted capacity.

As Appender.Add could be called from multiple goroutines,
we are not guaranteed that every time this metric is
incremented the channel send will block, but should give us
a reasonably approximated picture.

This monotonic counter increments every time Appender.Add
detects that bulkItems channel length and capacity are
equal before sending the created BulkIndexerItem to the
channel.

As bulkItems is a buffered channel, monitoring length and
capacity allow us to detect possible blocking events when
sending to the channel due to exhausted capacity.

As Appender.Add could be called from multiple goroutines,
we are not guaranteed that every time this metric is
incremented the channel send will block, but should give us
a reasonably approximated picture.
@endorama endorama requested a review from a team as a code owner December 10, 2024 10:34
@elastic-observability-automation elastic-observability-automation bot added the safe-to-test Automated label for running bench-diff on forked PRs label Dec 10, 2024
Copy link

@inge4pres inge4pres left a comment

Choose a reason for hiding this comment

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

🚀

@endorama endorama changed the title add docappender.blocked.add counter add metric: docappender.blocked.add counter Dec 10, 2024
@endorama endorama merged commit 5ab7a94 into main Dec 10, 2024
9 checks passed
@endorama endorama deleted the docappender.blocked.add-metric branch December 10, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe-to-test Automated label for running bench-diff on forked PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants