Skip to content

docs: name the posthog.json host and the injected release id in the web example - #755

Merged
rafaeelaudibert merged 2 commits into
mainfrom
rafa/docs-hog-example-host
Dec 1, 2026
Merged

rafaeelaudibert merged 2 commits into
mainfrom
rafa/docs-hog-example-host

Conversation

@rafaeelaudibert

Copy link
Copy Markdown
Member

💡 Motivation and Context

Follow-up to #754, from review comments that came in as it merged:

  • An EU Cloud job that follows the GitHub Actions steps can't get a token: step 2 named only projectId for posthog.json, so hog exchanged the OIDC token with US Cloud.
  • The js check didn't name _posthogReleaseId, which the default event mode injects next to _posthogChunkIds.

Changes

  • Step 2 says to put both the host and the projectId that hog ci setup prints in posthog.json, or to set HOG_HOST and HOG_PROJECT_ID.
  • The js check names _posthogChunkIds and _posthogReleaseId.

💚 How did you test it?

  • Docs only.

📝 Checklist

  • All commits are signed (see Commit signing)
  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

🤖 Generated with Claude Code

…eb example

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rafaeelaudibert
rafaeelaudibert requested a review from a team as a code owner December 1, 2026 19:30
@rafaeelaudibert rafaeelaudibert self-assigned this Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

posthog-flutter Compliance Report

Date: 2026-12-01T21:00:25.703691+00:00
Duration: 371129ms

✅ All Tests Passed!

232/232 tests passed


Capture_V1 Tests

✅ 105/105 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint ✅ 228ms
Endpoint And Method.Does Not Use Legacy Endpoints ✅ 129ms
Required Headers.Has Authorization Bearer Header ✅ 123ms
Required Headers.Has Content Type Json ✅ 124ms
Required Headers.Has Posthog Sdk Info Format ✅ 120ms
Required Headers.Has Posthog Attempt Header ✅ 118ms
Required Headers.Has Posthog Request Id ✅ 120ms
Required Headers.Has Posthog Request Timestamp ✅ 119ms
Required Headers.Has User Agent ✅ 121ms
Body Format.Body Has Created At And Batch ✅ 119ms
Body Format.No Api Key In Body ✅ 120ms
Body Format.No Sent At In Body ✅ 118ms
Event Format.Event Has Required Root Fields ✅ 118ms
Event Format.Event Uuid Is Valid ✅ 120ms
Event Format.Event Timestamp Is Rfc3339 ✅ 118ms
Event Format.Non Utc Event Timestamp Is Converted To Utc ✅ 119ms
Event Format.Distinct Id Is String ✅ 120ms
Event Format.Distinct Id At Root Not Properties ✅ 119ms
Event Format.Custom Properties Preserved ✅ 120ms
Event Format.Set Properties Preserved ✅ 121ms
Event Format.Set Once Properties Preserved ✅ 118ms
Event Format.Groups Properties Preserved ✅ 118ms
Event Format.Sdk Generates Uuid If Not Provided ✅ 118ms
Event Format.Event Has Required Root Fields Batch ✅ 124ms
Event Format.Event Uuid Is Valid Batch ✅ 124ms
Event Format.Event Timestamp Is Rfc3339 Batch ✅ 124ms
Event Format.Distinct Id Is String Batch ✅ 123ms
Event Format.Distinct Id At Root Not Properties Batch ✅ 124ms
Event Format.Custom Properties Preserved Batch ✅ 123ms
Event Format.Set Properties Preserved Batch ✅ 128ms
Event Format.Set Once Properties Preserved Batch ✅ 123ms
Event Format.Groups Properties Preserved Batch ✅ 124ms
Event Format.Sdk Generates Uuid If Not Provided Batch ✅ 123ms
Batch Behavior.Multiple Events In Single Batch ✅ 128ms
Batch Behavior.Batch Envelope Smoke ✅ 126ms
Batch Behavior.Flush With No Events Sends Nothing ✅ 109ms
Batch Behavior.Flush At Triggers Batch ✅ 1016ms
Batch Behavior.Created At Reflects Batch Creation Time ✅ 119ms
Deduplication.Generates Unique Uuids ✅ 128ms
Deduplication.Different Events Same Content Different Uuids ✅ 121ms
Deduplication.Preserves Uuid On Retry ✅ 5128ms
Deduplication.Preserves Timestamp On Retry ✅ 5124ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5128ms
Deduplication.No Duplicate Events In Batch ✅ 130ms
Header Behavior On Retry.Attempt Header Starts At One ✅ 117ms
Header Behavior On Retry.Attempt Header Increments On Retry ✅ 10128ms
Header Behavior On Retry.Request Id Preserved On Retry ✅ 5123ms
Header Behavior On Retry.Different Requests Have Different Request Ids ✅ 2233ms
Header Behavior On Retry.Request Timestamp Changes On Retry ✅ 5125ms
Response Format Validation.Success Response Has Uuid Keyed Results ✅ 117ms
Response Format Validation.Success Response Has Ok For Each Event ✅ 122ms
Response Format Validation.Success No Retry After When All Ok ✅ 119ms
Response Format Validation.Success Retry After Present When Retry Events ✅ 121ms
Response Format Validation.Success No Retry After When Drop Only ✅ 122ms
Response Format Validation.Response Echoes Request Id ✅ 118ms
Retry Behavior.Retries On 408 ✅ 5122ms
Retry Behavior.Retries On 500 ✅ 5123ms
Retry Behavior.Retries On 503 ✅ 5123ms
Retry Behavior.Retries On 504 ✅ 5125ms
Retry Behavior.Retries On 404 ✅ 5122ms
Retry Behavior.Retries On 429 ✅ 5124ms
Retry Behavior.Retries On 502 ✅ 5122ms
Retry Behavior.Retryable Errors Have Retry After ✅ 2122ms
Retry Behavior.Respects Retry After On Retryable Error ✅ 8124ms
Retry Behavior.Does Not Retry On 400 ✅ 2121ms
Retry Behavior.Does Not Retry On 401 ✅ 2120ms
Retry Behavior.Does Not Retry On 402 ✅ 2120ms
Retry Behavior.Does Not Retry On 413 ✅ 2120ms
Retry Behavior.Does Not Retry On 415 ✅ 2120ms
Retry Behavior.Non Retryable Errors Have No Retry After ✅ 2119ms
Retry Behavior.Implements Backoff ✅ 12129ms
Partial Batch Handling.Handles 200 Full Success ✅ 2120ms
Partial Batch Handling.Handles 200 With All Ok ✅ 3125ms
Partial Batch Handling.Does Not Retry Dropped Events ✅ 3122ms
Partial Batch Handling.Does Not Retry Warning Events ✅ 3123ms
Partial Batch Handling.Prunes Ok Events On Partial Retry ✅ 5126ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry ✅ 5126ms
Partial Batch Handling.Retries Only Retry Events From Partial ✅ 5129ms
Partial Batch Handling.Partial Retry Preserves Uuids ✅ 5124ms
Partial Batch Handling.Partial Retry Attempt Header Increments ✅ 5125ms
Partial Batch Handling.Partial Retry Request Id Preserved ✅ 5123ms
Partial Batch Handling.Respects Retry After On Partial ✅ 5125ms
Partial Batch Handling.Unknown Result Treated As Terminal ✅ 3124ms
Partial Batch Handling.Mixed Ok Drop Warning No Retry ✅ 3129ms
Compression.Sends Gzip Content Encoding ✅ 120ms
Compression.No Content Encoding When Disabled ✅ 116ms
Compression.Compressed Body Is Decompressible ✅ 117ms
Error Handling.Does Not Retry On Unknown 4Xx ✅ 2120ms
Event Options.Cookieless Mode Override ✅ 118ms
Event Options.Disable Skew Correction Override ✅ 117ms
Event Options.Process Person Profile Override ✅ 117ms
Event Options.Product Tour Id Override ✅ 120ms
Event Options.Unset Options Omitted ✅ 117ms
Event Options.Options Override In Batch ✅ 122ms
Event Options.Unknown Option Passes Through ✅ 117ms
Event Options.Option Value Is Not Converted ✅ 116ms
Event Options.Lenient Bool Option Values Are Not Converted ✅ 117ms
Event Options.Option Wins Over Legacy Property ✅ 117ms
Event Options.Legacy Property Fills Unset Option ✅ 116ms
Event Options.Null Option Falls Back To Legacy Property ✅ 117ms
Property Layers.Caller Property Beats Registered Property ✅ 118ms
Property Layers.Before Send Runs Last ✅ 118ms
Fail Open.Empty Api Key Sends Nothing ✅ 1111ms
Fail Open.Personal Api Key Sends Nothing ✅ 1112ms
Geoip And Historical Migration.Historical Migration Absent By Default ✅ 117ms

Capture_Ai_V1 Tests

✅ 110/110 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint ✅ 118ms
Endpoint And Method.Does Not Use Legacy Endpoints ✅ 116ms
Endpoint And Method.Capture Does Not Reroute Ai Named Events ✅ 116ms
Endpoint And Method.Capture Ai Does Not Reroute Non Ai Events ✅ 116ms
Lane Isolation.Failing Ai Lane Does Not Delay Analytics ✅ 5131ms
Required Headers.Has Authorization Bearer Header ✅ 117ms
Required Headers.Has Content Type Json ✅ 117ms
Required Headers.Has Posthog Sdk Info Format ✅ 116ms
Required Headers.Has Posthog Attempt Header ✅ 116ms
Required Headers.Has Posthog Request Id ✅ 115ms
Required Headers.Has Posthog Request Timestamp ✅ 115ms
Required Headers.Has User Agent ✅ 116ms
Body Format.Body Has Created At And Batch ✅ 116ms
Body Format.No Api Key In Body ✅ 115ms
Body Format.No Sent At In Body ✅ 116ms
Event Format.Event Has Required Root Fields ✅ 116ms
Event Format.Event Uuid Is Valid ✅ 115ms
Event Format.Event Timestamp Is Rfc3339 ✅ 116ms
Event Format.Non Utc Event Timestamp Is Converted To Utc ✅ 116ms
Event Format.Distinct Id Is String ✅ 116ms
Event Format.Distinct Id At Root Not Properties ✅ 116ms
Event Format.Custom Properties Preserved ✅ 116ms
Event Format.Set Properties Preserved ✅ 116ms
Event Format.Set Once Properties Preserved ✅ 116ms
Event Format.Groups Properties Preserved ✅ 116ms
Event Format.Sdk Generates Uuid If Not Provided ✅ 116ms
Event Format.Event Has Required Root Fields Batch ✅ 120ms
Event Format.Event Uuid Is Valid Batch ✅ 122ms
Event Format.Event Timestamp Is Rfc3339 Batch ✅ 120ms
Event Format.Distinct Id Is String Batch ✅ 121ms
Event Format.Distinct Id At Root Not Properties Batch ✅ 119ms
Event Format.Custom Properties Preserved Batch ✅ 120ms
Event Format.Set Properties Preserved Batch ✅ 120ms
Event Format.Set Once Properties Preserved Batch ✅ 120ms
Event Format.Groups Properties Preserved Batch ✅ 121ms
Event Format.Sdk Generates Uuid If Not Provided Batch ✅ 120ms
Batch Behavior.Multiple Events In Single Batch ✅ 126ms
Batch Behavior.Batch Envelope Smoke ✅ 123ms
Batch Behavior.Flush At Triggers Batch ✅ 1015ms
Batch Behavior.Created At Reflects Batch Creation Time ✅ 116ms
Deduplication.Generates Unique Uuids ✅ 125ms
Deduplication.Different Events Same Content Different Uuids ✅ 119ms
Deduplication.Preserves Uuid On Retry ✅ 5122ms
Deduplication.Preserves Timestamp On Retry ✅ 5121ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5127ms
Deduplication.No Duplicate Events In Batch ✅ 126ms
Header Behavior On Retry.Attempt Header Starts At One ✅ 117ms
Header Behavior On Retry.Attempt Header Increments On Retry ✅ 10126ms
Header Behavior On Retry.Request Id Preserved On Retry ✅ 5120ms
Header Behavior On Retry.Different Requests Have Different Request Ids ✅ 2230ms
Header Behavior On Retry.Request Timestamp Changes On Retry ✅ 5119ms
Response Format Validation.Success Response Has Uuid Keyed Results ✅ 116ms
Response Format Validation.Success Response Has Ok For Each Event ✅ 120ms
Response Format Validation.Success No Retry After When All Ok ✅ 119ms
Response Format Validation.Success Retry After Present When Retry Events ✅ 119ms
Response Format Validation.Success No Retry After When Drop Only ✅ 119ms
Response Format Validation.Response Echoes Request Id ✅ 115ms
Retry Behavior.Retries On 408 ✅ 5121ms
Retry Behavior.Retries On 500 ✅ 5122ms
Retry Behavior.Retries On 503 ✅ 5123ms
Retry Behavior.Retries On 504 ✅ 5122ms
Retry Behavior.Retries On 404 ✅ 5122ms
Retry Behavior.Retries On 429 ✅ 5122ms
Retry Behavior.Retries On 502 ✅ 5124ms
Retry Behavior.Retryable Errors Have Retry After ✅ 2119ms
Retry Behavior.Respects Retry After On Retryable Error ✅ 8125ms
Retry Behavior.Does Not Retry On 400 ✅ 2119ms
Retry Behavior.Does Not Retry On 401 ✅ 2120ms
Retry Behavior.Does Not Retry On 402 ✅ 2119ms
Retry Behavior.Does Not Retry On 413 ✅ 2120ms
Retry Behavior.Does Not Retry On 415 ✅ 2119ms
Retry Behavior.Non Retryable Errors Have No Retry After ✅ 2120ms
Retry Behavior.Implements Backoff ✅ 12121ms
Partial Batch Handling.Handles 200 Full Success ✅ 2119ms
Partial Batch Handling.Handles 200 With All Ok ✅ 3125ms
Partial Batch Handling.Does Not Retry Dropped Events ✅ 3122ms
Partial Batch Handling.Does Not Retry Warning Events ✅ 3122ms
Partial Batch Handling.Prunes Ok Events On Partial Retry ✅ 5124ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry ✅ 5124ms
Partial Batch Handling.Retries Only Retry Events From Partial ✅ 5126ms
Partial Batch Handling.Partial Retry Preserves Uuids ✅ 5120ms
Partial Batch Handling.Partial Retry Attempt Header Increments ✅ 5127ms
Partial Batch Handling.Partial Retry Request Id Preserved ✅ 5125ms
Partial Batch Handling.Respects Retry After On Partial ✅ 5121ms
Partial Batch Handling.Unknown Result Treated As Terminal ✅ 3124ms
Partial Batch Handling.Mixed Ok Drop Warning No Retry ✅ 3138ms
Compression.Sends Gzip Content Encoding ✅ 116ms
Compression.No Content Encoding When Disabled ✅ 115ms
Compression.Compressed Body Is Decompressible ✅ 116ms
Error Handling.Does Not Retry On Unknown 4Xx ✅ 2119ms
Event Options.Cookieless Mode Override ✅ 118ms
Event Options.Disable Skew Correction Override ✅ 117ms
Event Options.Process Person Profile Override ✅ 116ms
Event Options.Product Tour Id Override ✅ 116ms
Event Options.Unset Options Omitted ✅ 116ms
Event Options.Options Override In Batch ✅ 121ms
Event Options.Unknown Option Passes Through ✅ 116ms
Event Options.Option Value Is Not Converted ✅ 115ms
Event Options.Lenient Bool Option Values Are Not Converted ✅ 115ms
Event Options.Option Wins Over Legacy Property ✅ 115ms
Event Options.Legacy Property Fills Unset Option ✅ 116ms
Event Options.Null Option Falls Back To Legacy Property ✅ 115ms
Event Size.Event Over Ceiling Is Not Sent ✅ 4259ms
Event Size.Over Ceiling Drop Is Reported Or Logged Without Content ✅ 2199ms
Event Size.Batches Close Before Byte Target ✅ 6369ms
Geoip And Historical Migration.Historical Migration Absent By Default ✅ 118ms
Property Layers.Caller Property Beats Registered Property ✅ 115ms
Property Layers.Before Send Runs Last ✅ 115ms
Fail Open.Empty Api Key Sends Nothing ✅ 1113ms
Fail Open.Personal Api Key Sends Nothing ✅ 1111ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 23ms
Request Payload.Flags Request Uses V2 Query Param ✅ 16ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 12ms
Request Payload.Flags Request Omits Authorization Header ✅ 12ms
Request Payload.Token In Flags Body Matches Init ✅ 12ms
Request Payload.Groups Round Trip ✅ 13ms
Request Payload.Groups Default To Empty Object ✅ 13ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 12ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 11ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 13ms
Request Lifecycle.No Flags Request On Init Alone ✅ 4ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 115ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 20ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 13ms
Retry Behavior.Retries Flags On 502 ✅ 321ms
Retry Behavior.Retries Flags On 504 ✅ 319ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 120ms

@dustinbyrne dustinbyrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for picking up the #754 suggestions. The EU host and _posthogReleaseId changes match hog 1.0.0. One optional suggestion inline.

AI-assisted review.

Comment thread example/README.md Outdated

1. Run `hog ci setup --scope error_tracking:write` once in the repository, and have an organization admin approve the request.
2. Put the project ID that `hog ci setup` prints in `posthog.json` as `"projectId"`, or set `HOG_PROJECT_ID` (and `HOG_HOST` outside US Cloud) in the job.
2. Put the `host` and `projectId` that `hog ci setup` prints in `posthog.json`, or set `HOG_HOST` and `HOG_PROJECT_ID` in the job.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: Consider adding the self-hosted sentence from the #754 suggestion: "A self-hosted PostHog needs HOG_HOST either way."

For a self-hosted PostHog, hog ci setup leaves host out of the posthog.json snippet and instead prints that the job needs HOG_HOST (setup.ts#L49-L58, #L219-L221). So there's no posthog.json host to copy, and a job without HOG_HOST either sends the exchange to US Cloud (projectId only) or stops with workload_host_not_allowed (a self-hosted host in posthog.json, e.g. from hog auth login) (credentials.ts#L300-L313). hog's own hint uses the same wording (workload.ts#L42-L43), as does step 4 of the migration guide. Not a regression; base had the same gap on the posthog.json route.

Suggested change
2. Put the `host` and `projectId` that `hog ci setup` prints in `posthog.json`, or set `HOG_HOST` and `HOG_PROJECT_ID` in the job.
2. Put the `host` and `projectId` that `hog ci setup` prints in `posthog.json`, or set `HOG_HOST` and `HOG_PROJECT_ID` in the job. A self-hosted PostHog needs `HOG_HOST` either way.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🤖 Added in 67f2705.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@veria-ai

veria-ai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Reviews

@rafaeelaudibert
rafaeelaudibert merged commit 992b73d into main Dec 1, 2026
29 checks passed
@rafaeelaudibert
rafaeelaudibert deleted the rafa/docs-hog-example-host branch December 1, 2026 22:53
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