fix(observability): custom resource attributes use the t3code prefix#23974

merged1
main
GitHub fork: yordis/fix-otel-custom-attribute-prefix
opened5d agobyYyordis
View on GitHubTwo-way sync enabledPR last imported 4d ago

Problem

  • Unprefixed custom resource attributes (service.component, service.mode, t3.client.surface) sit in namespaces the semantic conventions own, so a future convention key can collide with them, and t3. is not the prefix the rest of T3 Code telemetry uses.

Change

  • Attributes specific to T3 Code use the t3code. prefix: t3code.component, t3code.client.surface (now desktop or web for the UI), and t3code.server.managed_by (desktop or standalone).
  • Heads up: this renames service.component, t3.client.surface and service.mode, so a query or dashboard that filters on them needs updating.

Scope and approval

  • Small, focused rename of attributes T3 Code already exports. No new signal or setting.

Verification

  • The new serverLogger.test.ts case (exported resource carries t3code.server.managed_by, process.runtime.name, service.instance.id) passes (7 of 7) and fails with the config change reverted. Format, lint, knip and typecheck pass for the changed scope.
  • vp run check:changed with GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null: format, lint, knip and typecheck pass; 1761 tests pass and 2 fail in files this change does not touch (ForgejoSourceControlProvider.test.ts "reads Forgejo jobs that did not run as finished checks" and storageCleanup.test.ts "compares the checked-out branch without a full status"). I did not check those two against a clean upstream/main.

Checks

24 successful · 8 skipped · 1 neutral
All checks passed
c89e13b

Added 1 commit

  • fix(observability): custom resource attributes use the t3code prefixc89e13b
Synced from GitHub

Warning

Review limit reached

Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 807319c276c6831b2c219640e9da5b38019a8f1d and c89e13b0ee1697a7f05f774be7125b18dbeaba74.

📒 Files selected for processing: 5
  • apps/server/src/config.ts
  • apps/server/src/serverLogger.test.ts
  • apps/web/src/observability/clientTracing.ts
  • docs/operations/observability.md
  • packages/shared/src/relayTracing.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Synced from GitHub

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — This PR changes exported OTLP resource-attribute names and values across production tracing paths, making it an observability contract migration rather than a mechanical cleanup. Existing relay monitoring queries still reference the old client-surface key, so the migration impact should receive human review.

You can add or adjust custom eligibility rules. Learn more.