Skip to content

docs(feature-flags): Clarify feature flag buffer behavior#18671

Draft
adinauer wants to merge 1 commit into
sdk/feature-flags-clear-apifrom
adinauer/docs/clarify-feature-flag-spec
Draft

docs(feature-flags): Clarify feature flag buffer behavior#18671
adinauer wants to merge 1 commit into
sdk/feature-flags-clear-apifrom
adinauer/docs/clarify-feature-flag-spec

Conversation

@adinauer

@adinauer adinauer commented Jul 8, 2026

Copy link
Copy Markdown
Member

Clarify the feature flag SDK spec added in #18660 with the behavior captured from the sentry-java implementation plan.

This documents scope and span buffer behavior, including uniqueness, SDK-defined limits, scope cloning and merging, span inheritance, payload mapping, and where add_feature_flag / clear_feature_flags should be exposed.

The limits are intentionally specified as SDK-enforced limits with recommended values, rather than fixed cross-SDK requirements, because different SDKs may need different values based on platform constraints.

Refs #18660
Refs getsentry/sentry-java#4763

Clarify scope and span feature flag buffer requirements so SDKs enforce limits while allowing platform-specific values.

Document where feature flag APIs should be exposed and how scope and span feature flags map to payloads.

Refs GH-18660

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Jul 8, 2026 11:25am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
sentry-docs Ignored Ignored Jul 8, 2026 11:25am

Request Review


#### Span Storage

Span feature flags provide context for individual spans. SDKs that track feature flags on spans **MUST** enforce a maximum number of unique evaluations per span (e.g. 10).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe say 10 is the recommended value ("e.g. 10" doesn't read like that)


Child spans **MUST NOT** inherit feature flags from parent spans.

If an SDK tracks both scope and span feature flags, adding a feature flag through a scope-level or top-level API while a span is active **MUST** also record the evaluation on the active span, subject to the span limit.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe say "subject to the rules listed above"? I'm guessing if a flag already exists on the active span, we'd also update it there when adding it to the scope?

@romtsn romtsn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk-develop-docs PRs touching develop-docs/sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants