Skip to content

Commit

Permalink
feat: Add last_event_id to top-level api
Browse files Browse the repository at this point in the history
Closes #3049
  • Loading branch information
szokeasaurusrex committed May 8, 2024
1 parent efc324d commit 958bc04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions sentry_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"is_initialized",
"isolation_scope",
"new_scope",
"last_event_id",
"push_scope",
"set_context",
"set_extra",
Expand Down
7 changes: 7 additions & 0 deletions sentry_sdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def overload(x):
"is_initialized",
"isolation_scope",
"new_scope",
"last_event_id",
"push_scope",
"set_context",
"set_extra",
Expand Down Expand Up @@ -375,3 +376,9 @@ def continue_trace(environ_or_headers, op=None, name=None, source=None):
return Scope.get_isolation_scope().continue_trace(
environ_or_headers, op, name, source
)


@clientmethod
def last_event_id():
# type: () -> Optional[str]
return get_client().last_event_id()

0 comments on commit 958bc04

Please sign in to comment.