- 
                Notifications
    
You must be signed in to change notification settings  - Fork 15
 
feat(insights): add events support #56
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
base: master
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR adds Honeybadger Insights events support with asynchronous batching, retry logic, and throttling capabilities. Events are queued and sent in configurable batches with support for filtering/modification through BeforeEvent hooks.
Key changes:
- Event batching system with configurable batch size and timeout
 - Retry logic with exponential backoff and throttling support
 - Queue management with automatic dropping of oldest events when at capacity
 - BeforeEvent callback system for event filtering and modification
 - Zerolog adapter for sending logs as Insights events
 
Reviewed Changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description | 
|---|---|
| event.go | Defines event payload structure and creation logic | 
| events_worker.go | Implements asynchronous event batching and sending worker | 
| ring_buffer.go | Provides circular buffer for efficient event queuing | 
| client.go | Adds Event method and BeforeEvent handler support | 
| configuration.go | Adds events-related configuration options | 
| server.go | Updates HTTP client to support events endpoint and JSONL format | 
| honeybadger.go | Adds public Event and BeforeEvent functions | 
| null_backend.go | Adds Event method to null backend implementation | 
| zerolog/ | New zerolog adapter package for sending logs as events | 
| go.mod | Updates Go version and dependencies | 
| README.md | Documents new events functionality | 
| Makefile | Updates linting tools | 
| *_test.go | Comprehensive test coverage for events functionality | 
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Only run tests against the supported runtimes & add blurb about it in the README.
Added a generic GetEnv that allows for typed and lazy fallbacks. Also added envs for events stuff
Also added a simple test_backend for.. testing.
Status
WIP
Description
Adds Honeybadger Insights events support with batching, retry logic, and throttling. Events
are queued and sent asynchronously in configurable batches. Includes BeforeEvent hooks for
filtering/modifying events before sending.
Key features:
Related PRs
None
Todos