Skip to main content

feature-flags

Gate a Sentry feature behind a FlagPole feature flag. Use when adding a feature flag, registering a flag in temporary.py, checking a flag from Python or the frontend, enabling a flag in tests, or asking where FlagPole rollout config lives. Trigger on "add a feature flag", "gate this behind a flag", "register a flag", "features.has", "api_expose", "OrganizationFeature", "ProjectFeature", "FlagPole".

소스 정보

저장소
getsentry/sentry
최근 소스 활동
2026년 8월 26일 13:21
감지된 SKILL.md 언어
영어
스타
45,528
포크
4,915

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
feature-flags
description
Gate a Sentry feature behind a FlagPole feature flag. Use when adding a feature flag, registering a flag in temporary.py, checking a flag from Python or the frontend, enabling a flag in tests, or asking where FlagPole rollout config lives. Trigger on "add a feature flag", "gate this behind a flag", "register a flag", "features.has", "api_expose", "OrganizationFeature", "ProjectFeature", "FlagPole".
# Feature Flags (FlagPole) New features should be gated behind a feature flag. 1. **Register** the flag in `src/sentry/features/temporary.py`: ```python manager.add("organizations:my-feature", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True) ``` Use `api_expose=True` if the frontend needs to check the flag. Use `ProjectFeature` and a `projects:` prefix for project-scoped flags. 2. **Python check**: ```python if features.has("organizations:my-feature", organization, actor=user): ``` 3. **Frontend check** (requires `api_expose=True`): ```typescript organization.features.includes('my-feature'); ``` 4. **Tests**: ```python with self.feature("organizations:my-feature"): ... ``` 5. **Rollout**: FlagPole YAML config lives in the `sentry-options-automator` repo, not here. 6. **Removal**: once the rollout is finished, the flag comes out in a fixed three-PR order — see the `remove-option-or-flag` skill. See https://develop.sentry.dev/feature-flags/ for full docs.
GitHub에서 보기