Skip to content

docs: Update server SDK feature flag examples#16702

Draft
dustinbyrne wants to merge 1 commit intodocs/python-evaluate-flags-canonicalfrom
docs/evaluate-flags-server-sdks-20260501185214
Draft

docs: Update server SDK feature flag examples#16702
dustinbyrne wants to merge 1 commit intodocs/python-evaluate-flags-canonicalfrom
docs/evaluate-flags-server-sdks-20260501185214

Conversation

@dustinbyrne
Copy link
Copy Markdown
Contributor

Changes

  • Builds on docs: Update Python documentation for evaluate_flags API #16684 and updates server SDK feature flag docs to use the new snapshot-style APIs as the canonical path:
    • Node evaluateFlags()
    • Go EvaluateFlags()
    • Ruby evaluate_flags() with enabled? / get_flag
    • PHP evaluateFlags()
    • .NET EvaluateFlagsAsync()
    • Elixir PostHog.FeatureFlags.evaluate_flags/2
    • Rust evaluate_flags()
    • Java server evaluateFlags()
  • Updates shared feature flag snippets, local evaluation/property override examples, experiment examples, library pages, and related exposure/cost/stale flag guidance.
  • Replaces old automatic capture flag-enrichment snippets (sendFeatureFlags, send_feature_flags, SendFeatureFlags, appendFeatureFlags) with passing evaluated snapshots to captures/events.
  • Deletes unreferenced server-side group flag snippets and obsolete send-feature-flags snippets.

Validation: ran git diff --check.

Notes for review:

  • Ruby's SDK snapshot method is enabled?() rather than is_enabled().
  • Elixir attaches evaluated flags through process context with PostHog.FeatureFlags.set_in_context(snapshot) rather than a capture(flags: ...) argument.
  • .NET OnlyAccessed() falls back to all flags if called before any access; the docs avoid the empty-snapshot warning language used by other SDKs.
  • Existing tutorials still use older single-flag APIs in several places; I left them alone to keep this PR focused on SDK docs/reference pages.

Checklist

  • I've read the docs and/or content style guides.
  • Words are spelled using American English
  • Use relative URLs for internal links
  • I've checked the pages added or changed in the Vercel preview build
  • If I moved a page, I added a redirect in vercel.json

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Deploy preview

Status Details Updated (UTC)
🔴 Failed View logs May 01, 2026 11:20PM

Push a fix or re-run the workflow to try again.

Common culprits
  • MDX issues - unescaped </> characters, unclosed tags, or malformed JSX
  • External API timeouts - GitHub, Strapi, or Ashby occasionally hiccup

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Vale prose linter → found 7 errors, 225 warnings, 27 suggestions in your markdown

Full report → · Copy the Job Summary code block into an LLM to batch-fix issues.

Note: Too many findings to show inline. See the Job Summary linked above.

File Errors Warnings Suggestions
contents/docs/experiments/adding-experiment-code.mdx 0 4 0
contents/docs/experiments/exposures.mdx 1 13 0
contents/docs/experiments/installation/dotnet.mdx 0 2 1
contents/docs/experiments/installation/rust.mdx 0 1 1
contents/docs/experiments/legacy-methodology.mdx 0 11 0
contents/docs/experiments/troubleshooting.mdx 0 13 2
contents/docs/feature-flags/cleaning-up-stale-flags.mdx 0 9 0
contents/docs/feature-flags/cutting-costs.mdx 0 24 0
contents/docs/feature-flags/installation/rust.mdx 0 1 0
contents/docs/feature-flags/local-evaluation/index.mdx 4 8 0
contents/docs/feature-flags/property-overrides.mdx 0 3 2
contents/docs/feature-flags/snippets/flag-charge-estimate.mdx 0 2 0
contents/docs/feature-flags/user-and-group-targeting.mdx 0 0 3
contents/docs/integrate/feature-flags-code/_snippets/feature-flags-code-dotnet.mdx 0 5 2
contents/docs/integrate/feature-flags-code/_snippets/feature-flags-code-elixir.mdx 0 3 2
contents/docs/integrate/feature-flags-code/_snippets/feature-flags-code-go.mdx 0 4 2
contents/docs/integrate/feature-flags-code/_snippets/feature-flags-code-java.mdx 0 4 2
contents/docs/integrate/feature-flags-code/_snippets/feature-flags-code-node.mdx 0 4 2
contents/docs/integrate/feature-flags-code/_snippets/feature-flags-code-php.mdx 0 4 2
contents/docs/integrate/feature-flags-code/_snippets/feature-flags-code-ruby.mdx 0 4 2
contents/docs/integrate/feature-flags-code/_snippets/feature-flags-code-rust.mdx 0 4 2
contents/docs/libraries/dotnet/index.mdx 0 10 0
contents/docs/libraries/go/index.mdx 0 12 0
contents/docs/libraries/java/index.mdx 0 10 0
contents/docs/libraries/node/index.mdx 2 28 1
contents/docs/libraries/php/index.mdx 0 20 0
contents/docs/libraries/ruby/index.mdx 0 17 1
contents/docs/libraries/rust/index.mdx 0 5 0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant