2025-12-01
This commit is contained in:
@@ -15,7 +15,6 @@ DEFAULT_FLAG_CAPACITY = 100
|
||||
|
||||
|
||||
class FlagBuffer:
|
||||
|
||||
def __init__(self, capacity):
|
||||
# type: (int) -> None
|
||||
self.capacity = capacity
|
||||
@@ -64,5 +63,9 @@ def add_feature_flag(flag, result):
|
||||
Records a flag and its value to be sent on subsequent error events.
|
||||
We recommend you do this on flag evaluations. Flags are buffered per Sentry scope.
|
||||
"""
|
||||
flags = sentry_sdk.get_current_scope().flags
|
||||
flags = sentry_sdk.get_isolation_scope().flags
|
||||
flags.set(flag, result)
|
||||
|
||||
span = sentry_sdk.get_current_span()
|
||||
if span:
|
||||
span.set_flag(f"flag.evaluation.{flag}", result)
|
||||
|
||||
Reference in New Issue
Block a user