Skip to content

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

Merged
worstell merged 1 commit into
mainfrom
add-tracing-spans
May 19, 2026
Merged

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

Conversation

@worstell
Copy link
Copy Markdown
Contributor

@worstell worstell commented May 15, 2026

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_and_upload (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. Span names match the equivalent bloxlet spans for cross-service consistency.

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

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019e28cc-12d9-766e-8a0d-7d42c46c824d
@worstell worstell force-pushed the add-tracing-spans branch from e3ab938 to e161e25 Compare May 19, 2026 18:47
@worstell worstell marked this pull request as ready for review May 19, 2026 18:49
@worstell worstell requested a review from a team as a code owner May 19, 2026 18:49
@worstell worstell requested review from stuartwdouglas and removed request for a team May 19, 2026 18:49
@worstell worstell merged commit 3d6a6ab into main May 19, 2026
9 checks passed
@worstell worstell deleted the add-tracing-spans branch May 19, 2026 19:51
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.

2 participants