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

Bring back last_event_id #3057

Closed
wants to merge 5 commits into from
Closed

Conversation

szokeasaurusrex
Copy link
Member

@szokeasaurusrex szokeasaurusrex commented May 8, 2024

last_event_id will return the ID of the most recently captured error event

Closes #3049

@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/last_event_id branch from 0dbb7be to 751f6ca Compare May 8, 2024 12:37
@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review May 8, 2024 12:37
@@ -750,6 +763,9 @@ def capture_event(
if self.transport is None:
return None

if is_error:
self._last_event_id = event_id
Copy link
Member Author

Choose a reason for hiding this comment

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

Do we want last_event_id only to return the ID of the most recent error event? Or, should we expand it to all events? Error event seems like the better option to align with #3049

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I think only errors is fine. Because the error ID is important for user feedback form.

@@ -709,6 +721,7 @@ def capture_event(

is_transaction = event_opt.get("type") == "transaction"
is_checkin = event_opt.get("type") == "check_in"
is_error = not is_transaction and not is_checkin
Copy link
Member

Choose a reason for hiding this comment

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

I guess this would also include profiles? Maybe make a check similar to the one for transaction?

@szokeasaurusrex szokeasaurusrex marked this pull request as draft May 8, 2024 14:03
@szokeasaurusrex
Copy link
Member Author

I am going to rewrite this PR, since we should be setting the last_event_id on the isolation scope, rather than the client, to align with the old last_event_id implementation which stored the last event ID on the hub.

@szokeasaurusrex
Copy link
Member Author

Following a discussion with @lforst, @Lms24, and @HazAT, we will reintroduce this functionality to align as closely as possible with how the last_event_id worked in 1.x. We will need to make some changes to align the functionality

@szokeasaurusrex
Copy link
Member Author

szokeasaurusrex commented May 10, 2024

Closing in favor of #3064, which will add last_event_id in the Scope, rather than the Client

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.

No more last_event_id
2 participants