用途:在 Sentry 中为功能添加 FlagPole 功能标志,使新功能受开关控制。
主要能力与用法:在 src/sentry/features/temporary.py 注册标志,例如 manager.add("organizations:my-feature", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)。若前端需要检查该标志,使用 api_expose=True;项目级标志使用 ProjectFeature 与 projects: 前缀。Python 检查:if features.has("organizations:my-feature", organization, actor=user)。前端检查(需 api_expose=True):organization.features.includes('my-feature')。测试:with self.feature("organizations:my-feature"): ...。
发布与移除:FlagPole 的 YAML 配置位于 sentry-options-automator 仓库,不在本仓库。发布完成后按固定三 PR 顺序移除标志,参见 remove-option-or-flag 技能。完整文档见 https://develop.sentry.dev/feature-flags/。
限制:资料未提供其他平台支持、收费或价格信息。