Skip to content

docs(java): Describe request context usage#17065

Merged
dustinbyrne merged 3 commits into
masterfrom
docs/java-server-request-context
May 28, 2026
Merged

docs(java): Describe request context usage#17065
dustinbyrne merged 3 commits into
masterfrom
docs/java-server-request-context

Conversation

@dustinbyrne
Copy link
Copy Markdown
Contributor

Changes

Adds Java SDK documentation for request context support:

  • Shows how to build request context from X-PostHog-Distinct-Id and X-PostHog-Session-Id headers
  • Documents attaching request metadata such as $current_url, $request_method, $request_path, $user_agent, and $ip
  • Shows using scoped context for capture, captureException, and evaluateFlags
  • Notes how to ignore tracing headers, the client-controlled nature of these headers, and ThreadLocal propagation limits

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 27, 2026

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview May 28, 2026 02:15PM

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Vale prose linter → found 0 errors, 13 warnings, 0 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/libraries/java/index.mdx — 0 errors, 13 warnings, 0 suggestions
Line Severity Message Rule
6:18 warning Use 'GitHub' instead of 'github'. Vale.Terms
6:37 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
6:45 warning Use 'Android' instead of 'android'. Vale.Terms
122:192 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
122:208 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
159:219 warning 'personless' is a possible misspelling. PostHogBase.Spelling
175:4 warning 'Feature flags' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
175:4 warning Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. PostHogBase.ProductNames
323:8 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
323:55 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
323:128 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
335:28 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
335:54 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames

Clarified request context usage and security considerations.
Corrected the wording from 'to' to 'with' for clarity.
@dustinbyrne dustinbyrne changed the title docs: add Java request context docs docs(java): Describe request context usage May 28, 2026
@dustinbyrne dustinbyrne requested a review from a team May 28, 2026 13:59
@dustinbyrne dustinbyrne merged commit e7a2a70 into master May 28, 2026
18 checks passed
@dustinbyrne dustinbyrne deleted the docs/java-server-request-context branch May 28, 2026 17:48
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.

2 participants