Repository navigation
Telemetry: every PostHog event says its environment (debug, testflight or appstore) - #1263
Merged
Merged
Conversation
…t or appstore) PostHogSink now takes the same environment name SentrySink gets and puts it on every usage event as `environment`, so App Store events can be told from TestFlight and Debug ones. ADR 0007 and the privacy page list it. Assisted-by: Claude Code
Skeyelab
enabled auto-merge (squash)
November 23, 2026 22:53
Assisted-by: Claude Code
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Assisted-by: Claude Code
Skeyelab
added a commit
that referenced
this pull request
Nov 23, 2026
…t or appstore) (#1263) (#1264) * Telemetry: every PostHog event says its environment (debug, testflight or appstore) PostHogSink now takes the same environment name SentrySink gets and puts it on every usage event as `environment`, so App Store events can be told from TestFlight and Debug ones. ADR 0007 and the privacy page list it. Assisted-by: Claude Code * Website: page dates for the privacy page change Assisted-by: Claude Code * Telemetry: test the app's PostHogSink init, for codecov/patch Assisted-by: Claude Code (cherry picked from commit c6e6058)
Skeyelab
added a commit
that referenced
this pull request
Nov 24, 2026
Skeyelab
added a commit
that referenced
this pull request
Nov 24, 2026
Skeyelab
added a commit
that referenced
this pull request
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
App Store 1.2.14 went live today, and its PostHog events mix with TestFlight 1.2.14's: events carry
$app_versionbut nothing that says which build sent them.PostHogSinknow takes the environment nameSentrySinkalready gets (TelemetryEnvironment.name(isDebugBuild:isTestFlight:):debug,testflightorappstore) and puts it on every usage event as the propertyenvironment, the same name Sentry uses.AppTelemetry.launch()passes it in.ADR 0007 (amended 2026-11-23) and the privacy page list the new property. It adds no new data type, so
PrivacyInfo.xcprivacyand the App Store label don't change.Test first
New test in
PostHogSinkTests: "Every event says the build it came from: debug, testflight or appstore, the same name Sentry gets" (environmentOnEvents).swift test --filter TelemetrySinksTestsfailed to compile,extra argument 'environment' in callatPostHogSink(environment: "appstore", client: client).appSinkBeforeStart), runs the publicPostHogSink(environment:)init, which codecov/patch counted as uncovered (60%, target 80%). It passed on its first run: it covers lines, it doesn't pin new behavior.VERIFY_QUICK=1 ./scripts/verify.shpassed (spelling, vocabulary, package tests, site). The full./scripts/verify.shpassed too (package tests, macOS build and AppTests, iOS Simulator build, site).Checked by tests only, not on a device. The next TestFlight build's events in PostHog should show
environment = testflight.Assisted-by: Claude Code