Skip to content

feat(tracing): add snapshot spans and propagator setup#309

Draft
worstell wants to merge 1 commit into
mainfrom
add-tracing-spans
Draft

feat(tracing): add snapshot spans and propagator setup#309
worstell wants to merge 1 commit into
mainfrom
add-tracing-spans

Conversation

@worstell
Copy link
Copy Markdown
Contributor

Adds two manual spans on the snapshot create/restore paths and registers a W3C TraceContext + Baggage propagator inside tracing.New so trace IDs flow across HTTP boundaries (otelhttp uses the global propagator, which was previously unset, so every service started a new trace).

New spans:

  • cachew.snapshot.create (in internal/snapshot/snapshot.go CreatePaths) — covers archive + zstd + upload
  • cachew.snapshot.restore (in internal/snapshot/snapshot.go Restore) — covers download + zstd + extract

Each span carries the cache key, archive name (create only), thread count, and exclude/include path counts as attributes.

Adds two manual spans on the snapshot create/restore paths and
registers a W3C TraceContext + Baggage propagator so trace IDs flow
across HTTP boundaries (otelhttp uses the global propagator; without
this, every service starts a new trace).

New spans:
- cachew.snapshot.create
- cachew.snapshot.restore

Amp-Thread-ID: https://ampcode.com/threads/T-019e28cc-12d9-766e-8a0d-7d42c46c824d
Co-authored-by: Amp <amp@ampcode.com>
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