From 57b9edccb88245f44c470965c48b343e514a09cc Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 18 Feb 2026 16:39:55 -0600 Subject: [PATCH] Comment --- src/analytics/utils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/analytics/utils.ts b/src/analytics/utils.ts index 5427bad0f8..2fed18c165 100644 --- a/src/analytics/utils.ts +++ b/src/analytics/utils.ts @@ -38,8 +38,8 @@ export function accountToSessionMetadata( * Get anonymous identifiers and construct headers we use for requests that may * trigger experiment exposures in our backend. These values are used for A/B * test bucketing, in addition to the user DID, if the request is - * authenticated. They ensure we can attribute exposures to a specific device - * and session, even for unauthenticated requests. + * authenticated. They ensure we can consistently deliver beta features to + * users. * * These headers must stay in sync with our appview. * @see https://github.com/bluesky-social/atproto/blob/39cf199df5847d3fd4a60d8cdeb604a0e07f9784/packages/bsky/src/feature-gates/utils.ts#L7-L8 @@ -48,6 +48,10 @@ export function getAnalyticsHeaders() { return { 'X-Bsky-Device-Id': getDeviceId(), 'X-Bsky-Session-Id': getSessionId(), + /** + * This can already be inferred from server requests, but for consistency + * in feature bucketing, we also include it here. + */ 'X-Bsky-IP-Geolocation': getIPGeolocationString(), } }