Skip to content

Commit 571910d

Browse files
.
1 parent a881dc5 commit 571910d

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

sentry_sdk/integrations/redis/modules/caches.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ def _get_cache_span_description(redis_command, args, kwargs, integration):
6666
# type: (str, tuple[Any, ...], dict[str, Any], RedisIntegration) -> str
6767
description = _key_as_string(_get_safe_key(redis_command, args, kwargs))
6868

69-
data_should_be_truncated = (
70-
integration.max_data_size and len(description) > integration.max_data_size
71-
)
72-
if data_should_be_truncated:
69+
if integration.max_data_size and len(description) > integration.max_data_size:
7370
description = description[: integration.max_data_size - len("...")] + "..."
7471

7572
return description

sentry_sdk/integrations/redis/modules/queries.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ def _get_db_span_description(integration, command_name, args):
3434
with capture_internal_exceptions():
3535
description = _get_safe_command(command_name, args)
3636

37-
data_should_be_truncated = (
38-
integration.max_data_size and len(description) > integration.max_data_size
39-
)
40-
if data_should_be_truncated:
37+
if integration.max_data_size and len(description) > integration.max_data_size:
4138
description = description[: integration.max_data_size - len("...")] + "..."
4239

4340
return description

0 commit comments

Comments
 (0)