Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ sentry-sdk==0.10.1

A major release `N` implies the previous release `N-1` will no longer receive updates. We generally do not backport bugfixes to older versions unless they are security relevant. However, feel free to ask for backports of specific commits on the bugtracker.

## Unreleased

- No longer set the last event id for transactions #1186

## 1.3.1

- Fix detection of contextvars compatibility with Gevent versions >=20.9.0 #1157
Expand Down
3 changes: 2 additions & 1 deletion sentry_sdk/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,9 @@ def capture_event(
client, top_scope = self._stack[-1]
scope = _update_scope(top_scope, scope, scope_args)
if client is not None:
is_transaction = event.get("type") == "transaction"
rv = client.capture_event(event, hint, scope)
if rv is not None:
if rv is not None and not is_transaction:
self._last_event_id = rv
return rv
return None
Expand Down
5 changes: 5 additions & 0 deletions tests/test_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ def test_event_id(sentry_init, capture_events):
assert last_event_id() == event_id
assert Hub.current.last_event_id() == event_id

new_event_id = Hub.current.capture_event({"type": "transaction"})
assert new_event_id is not None
assert new_event_id != event_id
assert Hub.current.last_event_id() == event_id


def test_option_callback(sentry_init, capture_events):
drop_events = False
Expand Down