sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

[Hackweek] Added feature flags to SDK

Open mitsuhiko opened this issue 3 years ago • 2 comments

This adds basic support for the hackweek feature flag API.

Example:

import sentry_sdk

sentry_sdk.init(_experiments={"feature_flags_enabled": True})
sentry_sdk.wait_until_ready()

with sentry_sdk.configure_scope() as scope:
    scope.set_tag("isSentryDev", "true")

profiling_enabled = sentry_sdk.is_feature_flag_enabled("@@profilingEnabled")
access_to_profiling = sentry_sdk.is_feature_flag_enabled("@@accessToProfiling")
sample_rate = None

if access_to_profiling:
    info = sentry_sdk.get_feature_flag_info("@@tracesSampleRate")
    if info is not None:
        sample_rate = info.result

print(f"{profiling_enabled=}")
print(f"{access_to_profiling=}")
print(f"{sample_rate=}")

mitsuhiko avatar Aug 24 '22 09:08 mitsuhiko

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Sep 16 '22 00:09 github-actions[bot]

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Oct 18 '23 07:10 getsantry[bot]

Closing this, because it will not land anytime soon.

antonpirker avatar Jul 18 '24 11:07 antonpirker