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
2 changes: 2 additions & 0 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
- `enable_logs` and `before_send_log` are now regular SDK options. Their original versions under `_experiments` have been removed.

#### Integrations

- AWS Lambda, GCP: The message of the warning the SDK optionally emits if a function is about to time out has changed.
- Redis: In Redis pipeline spans there is no `span["data"]["redis.commands"]` that contains a dict `{"count": 3, "first_ten": ["cmd1", "cmd2", ...]}` but instead `span["data"]["redis.commands.count"]` (containing `3`) and `span["data"]["redis.commands.first_ten"]` (containing `["cmd1", "cmd2", ...]`).
- clickhouse-driver: The query is now available under the `db.query.text` span attribute (only if `send_default_pii` is `True`).
- Logging: By default, the SDK won't capture Sentry issues anymore when calling `logging.error()`, `logging.critical()` or `logging.exception()`. If you want to preserve the old behavior use `sentry_sdk.init(integrations=[LoggingIntegration(event_level="ERROR")])`.
Expand Down
6 changes: 1 addition & 5 deletions sentry_sdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1424,11 +1424,7 @@ def run(self) -> None:
integer_configured_timeout = integer_configured_timeout + 1

# Raising Exception after timeout duration is reached
raise ServerlessTimeoutWarning(
"WARNING : Function is expected to get timed out. Configured timeout duration = {} seconds.".format(
integer_configured_timeout
)
)
raise ServerlessTimeoutWarning("WARNING: Function is about to time out.")


def to_base64(original: str) -> Optional[str]:
Expand Down
4 changes: 1 addition & 3 deletions tests/integrations/aws_lambda/test_aws_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,7 @@ def test_timeout_error(lambda_client, test_environment):
(exception,) = error_event["exception"]["values"]
assert not exception["mechanism"]["handled"]
assert exception["type"] == "ServerlessTimeoutWarning"
assert exception["value"].startswith(
"WARNING : Function is expected to get timed out. Configured timeout duration ="
)
assert exception["value"] == "WARNING: Function is about to time out."
assert exception["mechanism"]["type"] == "threading"


Expand Down
5 changes: 1 addition & 4 deletions tests/integrations/gcp/test_gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,7 @@ def cloud_function(functionhandler, event):
(exception,) = envelope_items[0]["exception"]["values"]

assert exception["type"] == "ServerlessTimeoutWarning"
assert (
exception["value"]
== "WARNING : Function is expected to get timed out. Configured timeout duration = 3 seconds."
)
assert exception["value"] == "WARNING: Function is about to time out."
assert exception["mechanism"]["type"] == "threading"
assert not exception["mechanism"]["handled"]

Expand Down
Loading