Skip to content

Commit 72db779

Browse files
cmanallenmifu67
authored andcommitted
feat(flags): Enable flagpole sdk integration (#81801)
Enables flagpole SDK integration.
1 parent 639fb23 commit 72db779

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

Diff for: src/sentry/utils/flag.py

+5-11
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,11 @@ def setup_once():
1616

1717

1818
def flag_error_processor(event, exc_info):
19-
try:
20-
scope = sentry_sdk.get_current_scope()
21-
event["contexts"]["flags"] = {"values": scope.flags.get()}
22-
return event
23-
except Exception:
24-
logger.exception("Flag serialization failed")
19+
scope = sentry_sdk.get_current_scope()
20+
event["contexts"]["flags"] = {"values": scope.flags.get()}
21+
return event
2522

2623

2724
def flag_pole_hook(flag: str, result: bool):
28-
try:
29-
flags = sentry_sdk.get_current_scope().flags
30-
flags.set(flag, result)
31-
except Exception:
32-
logger.exception("Set flag failed")
25+
flags = sentry_sdk.get_current_scope().flags
26+
flags.set(flag, result)

Diff for: src/sentry/utils/sdk.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
from sentry.features.rollout import in_random_rollout
2727
from sentry.utils import metrics
2828
from sentry.utils.db import DjangoAtomicIntegration
29-
30-
# from sentry.utils.flag import FlagPoleIntegration
29+
from sentry.utils.flag import FlagPoleIntegration
3130
from sentry.utils.rust import RustInfoIntegration
3231

3332
# Can't import models in utils because utils should be the bottom of the food chain
@@ -466,8 +465,7 @@ def flush(
466465
RustInfoIntegration(),
467466
RedisIntegration(),
468467
ThreadingIntegration(propagate_hub=True),
469-
# Temporarily disabled.
470-
# FlagPoleIntegration(),
468+
FlagPoleIntegration(),
471469
],
472470
**sdk_options,
473471
)

0 commit comments

Comments
 (0)