Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ export OPENADAPT_TELEMETRY_ENABLED=false
- Tag keys are validated, sensitive/invalid keys are dropped, and values are scrubbed before upload
- User IDs are HMAC-anonymized before upload (`anon:v2:<hash>`)
- `send_default_pii` is enforced to `false` by the client
- PostHog events set `$geoip_disable: true` to suppress IP geolocation enrichment

## Internal Usage Tagging

Expand Down
5 changes: 4 additions & 1 deletion src/openadapt_telemetry/posthog.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ def _queue_capture_payload(
"api_key": _posthog_project_api_key(),
"event": event,
"distinct_id": distinct_id,
"properties": properties,
# This client runs on end-user machines. Explicitly suppress PostHog's
# ingest-side IP geolocation for every event; callers cannot override
# the privacy boundary with a supplied property.
"properties": {**properties, "$geoip_disable": True},
}
try:
_ensure_worker().put_nowait(payload)
Expand Down
1 change: 1 addition & 0 deletions tests/test_posthog.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def test_capture_event_enabled_in_ci_with_override() -> None:
assert queue.payload is not None
assert queue.payload["event"] == "agent_run"
assert queue.payload["distinct_id"] == "test-id"
assert queue.payload["properties"]["$geoip_disable"] is True


def test_capture_event_scrubs_sensitive_properties() -> None:
Expand Down
Loading