Skip to content

Add correlated end-to-end wallet telemetry - #396

Merged
ty-everett merged 9 commits into
mainfrom
codex/wallet-call-telemetry
Jul 30, 2026
Merged

ty-everett merged 9 commits into
mainfrom
codex/wallet-call-telemetry

Conversation

@ty-everett

@ty-everett ty-everett commented Jul 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • extend the existing provider-neutral telemetry primitive with monotonic spans, W3C trace/span context, explicit carriers, runtime metric hooks, runtime enablement predicates, bounded sanitization, and a BRC-100 wallet instrumentation proxy
  • propagate context through auth middleware and Wallet Storage HTTP, then instrument validation, permissions (including parallel callbacks and cache disposition), signer/createAction phases, change generation, ChainTracks retries/cache, storage RPC/serialization, server auth/authorization/handlers, and per-query Knex timing
  • keep telemetry disabled by default, sink-neutral, nonblocking, privacy-bounded, and backward-compatible
  • reduce browser/mobile payload size by resolving only the four required hash-wasm algorithm builds and prohibit the monolithic UMD entry from reappearing in platform bundles

Operational impact

No provider, Usercom, endpoint, or vendor policy is introduced. Hosts opt in by supplying a sink. Export is never awaited on a wallet path; sink failures are isolated. CPU/GC/heap/event-loop values are emitted only through an explicit host runtime hook, avoiding false precision in runtimes that cannot observe them.

Validation

  • based on exact upstream head 235b82ed6; final head 319cb489d
  • SDK coverage: 148 suites / 5,814 tests passed
  • auth middleware coverage: 6 suites / 104 tests passed
  • Wallet Toolbox coverage: 178 suites / 1,529 tests passed (5 skipped)
  • strict changed-line coverage: 100% (426/426 coverable lines); hosted Codecov patch check: 98.29% (90% target)
  • repository health: 92 control tests passed; 0 contract findings and 0 control errors
  • focused telemetry regressions cover permissions, parallel Knex queries, storage remoting, ChainTracks retry/cache, generateChange, W3C context, runtime enablement, and privacy redaction
  • full workspace build/typecheck, zero-warning lint, formatting, packed artifact/clean-consumer checks, dependency review, mutation ratchets, platform contracts, and git diff --check
  • hosted final-head runs all passed: CI 30510948026, CodeQL 30510948050, Conformance 30510948065; all 60 PR checks are successful or intentionally skipped, including zero-new-findings Sonar and CodeQL

Platform payload result

No size budget was raised. Relative to exact upstream base 235b82ed6:

  • Metro: 1,679,768 → 1,556,830 raw bytes (-122,938 / -7.3%); gzip -47,519; Brotli -39,401
  • Hermes: 3,241,948 → 3,128,918 raw bytes (-113,030 / -3.5%); gzip -51,602; Brotli -36,731
  • Vite browser: +38,625 raw bytes / +7,035 gzip for the generic telemetry capability
  • esbuild browser: +25,824 raw bytes / +6,353 gzip

The pre-existing monolithic hash-wasm UMD import is replaced with the four algorithms Wallet Toolbox actually uses. A platform-composition regression check prevents the all-algorithm entry from returning. Mobile is therefore materially smaller than untouched upstream despite the new telemetry, and the original Metro/Hermes ceilings remain unchanged.

Release coordination

The Metanet Client Desktop and Metanet Explorer Mobile draft PRs consume this API through feature detection so their branches remain buildable against today’s published packages. Before either wallet is released, publish the SDK/Auth/Wallet Toolbox package set from this PR and update the wallet lockfiles to that release line so the generic inner spans are active.

@codecov

codecov Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

@ty-everett
ty-everett force-pushed the codex/wallet-call-telemetry branch from ed1cc18 to 0f61e2e Compare July 30, 2026 03:02
@sonarqubecloud

Copy link
Copy Markdown

@ty-everett
ty-everett marked this pull request as ready for review July 30, 2026 03:59
@ty-everett
ty-everett merged commit 7627c7b into main Jul 30, 2026
60 checks passed
@ty-everett
ty-everett deleted the codex/wallet-call-telemetry branch July 30, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant