Skip to content

Commit

Permalink
Merge branch 'master' into sentry-sdk-2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Feb 19, 2024
2 parents 93f89e0 + 336edf7 commit 7b062ee
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/init_serverless_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Then the Handler function sstring should be replaced with
'sentry_sdk.integrations.init_serverless_sdk.sentry_lambda_handler'
"""

import os
import sys
import re
Expand Down
1 change: 1 addition & 0 deletions sentry_sdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def flush(
@hubmethod
def last_event_id():
# type: () -> Optional[str]

return Hub.current.last_event_id()


Expand Down
10 changes: 9 additions & 1 deletion sentry_sdk/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,15 @@ def scope(self):

def last_event_id(self):
# type: () -> Optional[str]
"""Returns the last event ID."""
"""
Returns the last event ID.
.. deprecated:: 1.40.5
This function is deprecated and will be removed in a future release. The functions `capture_event`, `capture_message`, and `capture_exception` return the event ID directly.
"""
logger.warning(
"Deprecated: last_event_id is deprecated. This will be removed in the future. The functions `capture_event`, `capture_message`, and `capture_exception` return the event ID directly."
)
return self._last_event_id

def bind_client(
Expand Down

0 comments on commit 7b062ee

Please sign in to comment.