Skip to content

Conversation

@luiseterc
Copy link
Collaborator

  1. Added buffered channels: Changed from unbuffered to buffered channels with a capacity of 1000 events, allowing the system to handle event bursts without blocking
  2. Made SendEvent non-blocking: Replaced the blocking goroutine send with a non-blocking select statement that drops events when the buffer is full rather than accumulating goroutines

These changes should prevent the exporter from hanging during high-volume event bursts in AWS. The buffer accommodates temporary spikes, and if a sink truly can't keep up, events are dropped gracefully with warnings logged rather than causing goroutine buildup that freezes the system.

Fixes #6

@luiseterc luiseterc merged commit 55803cd into master Oct 14, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unbuffered Channels in ChannelBasedReceiverRegistry

2 participants