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):
5959 "Experiments" ,
6060 {
6161 "max_spans" : Optional [int ],
62+ "max_flags" : Optional [int ],
6263 "record_sql_params" : Optional [bool ],
6364 "continuous_profiling_auto_start" : Optional [bool ],
6465 "continuous_profiling_mode" : Optional [ContinuousProfilerMode ],
Original file line number Diff line number Diff line change 99 FlagData = TypedDict ("FlagData" , {"flag" : str , "result" : bool })
1010
1111
12+ DEFAULT_FLAG_CAPACITY = 100
13+
14+
1215class FlagBuffer :
1316
1417 def __init__ (self , capacity ):
Original file line number Diff line number Diff line change 1111
1212from sentry_sdk .attachments import Attachment
1313from 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
1515from sentry_sdk .profiler .continuous_profiler import try_autostart_continuous_profiler
1616from sentry_sdk .profiler .transaction_profiler import Profile
1717from sentry_sdk .session import Session
@@ -1555,7 +1555,11 @@ def __repr__(self):
15551555 def flags (self ):
15561556 # type: () -> FlagBuffer
15571557 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 )
15591563 return self ._flags
15601564
15611565
You can’t perform that action at this time.
0 commit comments