File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ class CompressionAlgo(Enum):
59
59
"Experiments" ,
60
60
{
61
61
"max_spans" : Optional [int ],
62
+ "max_flags" : Optional [int ],
62
63
"record_sql_params" : Optional [bool ],
63
64
"continuous_profiling_auto_start" : Optional [bool ],
64
65
"continuous_profiling_mode" : Optional [ContinuousProfilerMode ],
Original file line number Diff line number Diff line change 9
9
FlagData = TypedDict ("FlagData" , {"flag" : str , "result" : bool })
10
10
11
11
12
+ DEFAULT_FLAG_CAPACITY = 100
13
+
14
+
12
15
class FlagBuffer :
13
16
14
17
def __init__ (self , capacity ):
Original file line number Diff line number Diff line change 11
11
12
12
from sentry_sdk .attachments import Attachment
13
13
from sentry_sdk .consts import DEFAULT_MAX_BREADCRUMBS , FALSE_VALUES , INSTRUMENTER
14
- from sentry_sdk .flag_utils import FlagBuffer
14
+ from sentry_sdk .flag_utils import FlagBuffer , DEFAULT_FLAG_CAPACITY
15
15
from sentry_sdk .profiler .continuous_profiler import try_autostart_continuous_profiler
16
16
from sentry_sdk .profiler .transaction_profiler import Profile
17
17
from sentry_sdk .session import Session
@@ -1555,7 +1555,11 @@ def __repr__(self):
1555
1555
def flags (self ):
1556
1556
# type: () -> FlagBuffer
1557
1557
if self ._flags is None :
1558
- self ._flags = FlagBuffer (capacity = 100 )
1558
+ max_flags = (
1559
+ self .get_client ().options ["_experiments" ].get ("max_flags" )
1560
+ or DEFAULT_FLAG_CAPACITY
1561
+ )
1562
+ self ._flags = FlagBuffer (capacity = max_flags )
1559
1563
return self ._flags
1560
1564
1561
1565
You can’t perform that action at this time.
0 commit comments