Skip to content

[codex] Add OpenTelemetry IPFS retrieval instrumentation#2

Merged
TheGreatAlgo merged 2 commits into
mainfrom
codex/opentelemetry-ipfs-retrieval-js
Jun 9, 2026
Merged

[codex] Add OpenTelemetry IPFS retrieval instrumentation#2
TheGreatAlgo merged 2 commits into
mainfrom
codex/opentelemetry-ipfs-retrieval-js

Conversation

@0xSwego

@0xSwego 0xSwego commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds passive OpenTelemetry API instrumentation to the JavaScript client IPFS/Zarr open path, mirroring the Python client instrumentation where this repository owns the behavior.

  • Adds @opentelemetry/api as a runtime dependency without adding exporters or SDK setup.
  • Wraps openDatasetFromCid with spans for dataset opens and Jaxray IPFS store opens.
  • Records counters/histograms for dataset and store open requests/durations with gateway, store type, and status attributes.
  • Keeps CID on trace spans only, avoiding high-cardinality metric labels.
  • Documents the emitted span/metric names and adds focused tests for the open path and helper behavior.

Notes

The JS client delegates HAMT/block traversal and lower-level IPFS/Zarr behavior to @dclimate/jaxray, which is already at the latest published version (0.6.8). Those lower-level Python py-hamt counters do not have an owned equivalent in this repo.

Validation

  • npm run build
  • npx vitest run tests/open-dataset.test.ts
  • npm test -- --run

0xSwego commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

Validation note: local JS validation passed with:

  • npm run build
  • npx vitest run tests/open-dataset.test.ts
  • npm test -- --run

The GitHub Client Sync Check failed before reaching JS install/build/test. It fails while checking out private dClimate/dclimate-client-py from this public repo using the default Actions token:

fatal: repository 'https://github.com/dClimate/dclimate-client-py/' not found

This appears to be an existing workflow access/configuration issue rather than a failure introduced by this branch; recent main runs show the same workflow failing.

@0xSwego 0xSwego marked this pull request as ready for review June 8, 2026 18:19
@TheGreatAlgo TheGreatAlgo merged commit 0b76694 into main Jun 9, 2026
1 check passed
@0xSwego 0xSwego deleted the codex/opentelemetry-ipfs-retrieval-js branch June 9, 2026 14:41
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