fix: Events API fixes - ordering, project deprecation, enrich_span event_id#195
Merged
Conversation
…ent_id - Fix jumbled event ordering: get_by_session_id now returns events sorted chronologically by start_time - Deprecate project parameter: export() and get_by_session_id() now show DeprecationWarning when project is passed (backend infers from filters) - Fix enrich_span with event_id: When event_id is provided, enrich_span now calls PUT /events API to update that specific event - Add retry logic to export() for transient errors (502, 503, 504) - Add comprehensive unit tests and integration tests for all fixes Bumps version to 1.0.0rc15
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
dhruv-hhai
commented
Jan 28, 2026
| config=config, | ||
| error=error, | ||
| event_id=event_id, | ||
| event_id=None, # Don't set event_id on span when enriching current span |
Contributor
Author
There was a problem hiding this comment.
hmm we still want this old behavior where a customer would be allowed to override the default event id on the event, it's a different use-case that enriching an existing event, suggest a new variable name & keep the old behavior along side the new
…te override) - event_id: Calls PUT /events API to update an existing event - update_event_id: Sets honeyhive_event_id span attribute to override the default event ID on the trace This keeps both use cases available as requested in PR review.
Contributor
📚 Documentation Preview Built✅ Documentation preview is ready! 📦 Download PreviewDownload documentation artifact 🔍 How to Review
✅ Validation Status
Preview generated for PR #195 |
Contributor
📚 Documentation Preview Built✅ Documentation preview is ready! 📦 Download PreviewDownload documentation artifact 🔍 How to Review
✅ Validation Status
Preview generated for PR #195 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_by_session_idnow returns events sorted chronologically bystart_timeexport()andget_by_session_id()now showDeprecationWarningwhenprojectis passed (backend infers from filters)event_idis provided,enrich_spannow callsPUT /eventsAPI to update that specific event instead of enriching the current spanexport()now retries on transient errors (502, 503, 504) with exponential backoffTest plan
Files changed
src/honeyhive/__init__.py- Version bumpsrc/honeyhive/api/client.py- Event sorting, project deprecation, retry logicsrc/honeyhive/tracer/core/context.py- enrich_span event_id handlingsrc/honeyhive/tracer/instrumentation/enrichment.py- API update logic for event_idtests/unit/test_api_events_fixes.py- New unit teststests_v2/integrations/test_events_fixes_integration.py- New integration tests