File tree Expand file tree Collapse file tree
sentry_sdk/integrations/redis Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import warnings
2+
13from sentry_sdk .integrations import Integration , DidNotEnable
24from sentry_sdk .integrations .redis .consts import _DEFAULT_MAX_DATA_SIZE
35from sentry_sdk .integrations .redis .rb import _patch_rb
@@ -16,10 +18,18 @@ class RedisIntegration(Integration):
1618 identifier = "redis"
1719
1820 def __init__ (self , max_data_size = _DEFAULT_MAX_DATA_SIZE , cache_prefixes = None ):
19- # type: (int, Optional[list[str]]) -> None
21+ # type: (Optional[ int] , Optional[list[str]]) -> None
2022 self .max_data_size = max_data_size
2123 self .cache_prefixes = cache_prefixes if cache_prefixes is not None else []
2224
25+ if max_data_size is not None :
26+ warnings .warn (
27+ "The `max_data_size` parameter of the `RedisIntegration() constructor is"
28+ "deprecated and will be removed in version 3.0 of sentry-sdk." ,
29+ DeprecationWarning ,
30+ stacklevel = 2 ,
31+ )
32+
2333 @staticmethod
2434 def setup_once ():
2535 # type: () -> None
Original file line number Diff line number Diff line change 1616]
1717_MAX_NUM_ARGS = 10 # Trim argument lists to this many values
1818_MAX_NUM_COMMANDS = 10 # Trim command lists to this many values
19- _DEFAULT_MAX_DATA_SIZE = 1024
19+ _DEFAULT_MAX_DATA_SIZE = None
You can’t perform that action at this time.
0 commit comments