Repository navigation
build(deps): move OpenTelemetry to the 3.x SDK and 0.300 exporters - #159
Merged
Merged
Conversation
Supersedes the dependabot bumps of sdk-logs and resources, which could not land on their own: 3.x peers on api >=1.10 <1.11 and the stable packages only pair with the 0.300 exporters. sdk-trace-base and sdk-trace-node have no 3.x release (deprecated for sdk-trace), so tracing moves to sdk-trace plus context-async-hooks. NodeTracerProvider.register() is gone, so the global provider and context manager are set explicitly. Batch and simple span processors now take an options object. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
semics-tech
marked this pull request as ready for review
October 31, 2026 07:17
# Conflicts: # packages/server/package.json # pnpm-lock.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #153 (sdk-logs 0.223 -> 3.0.0) and #154 (resources 2.12 -> 3.0.0). Both can be closed once this merges. I haven't touched the .github bumps #122-#126.
Why #153/#154 failed
main, so their lockfiles still pinnode-forge@1.4.0(6 high advisories, patched in 1.4.1).mainalready hasnode-forge ^1.4.2, so basing on currentmainclears it. No audit config change needed.seedexited 1 on the stale base. I couldn't pull the seed log out of the CI output, so this is unconfirmed. Please check that this PR's Compose smoke run is green; if it isn't, the seed log is the thing to read.Changes
@opentelemetry/resources^3.0.0,@opentelemetry/sdk-logs^3.0.0. The exporters stay on ^0.300.0, which depend on sdk-logs/sdk-trace 3.0.0.sdk-trace-baseandsdk-trace-nodehave no 3.x release. They're deprecated for@opentelemetry/sdk-trace, which 3.0.0 and the 0.300 trace exporter use. Tracing therefore moves to@opentelemetry/sdk-trace^3.0.0 plus@opentelemetry/context-async-hooks^3.0.0. This leaves a single copy of each OTel package in the lockfile.@opentelemetry/apistays at ^1.10.0, which the 3.x peer range (>=1.10 <1.11) needs.api-logsstays at 0.223.0, the latest published; sdk-logs 3 no longer depends on it.packages/server/src/tracing.tsmigration:NodeTracerProviderbecomesTracerProvider.provider.register()no longer exists, so the global provider and anAsyncLocalStorageContextManagerare set explicitly, andstopTracingdisables them again.BatchSpanProcessorandSimpleSpanProcessornow take{ exporter }.packages/server/test/tracing.test.tsneeds no database. It checks that the provider is registered, the active span survives anawait, sample ratio 0 drops spans, andstopTracingresets to no-op.LoggerProviderandBatchLogRecordProcessorinaudit-export.tsneeded no source change.Node
No bump needed:
engines, the Dockerfile (node:24-bookworm-slim) and CI (NODE_VERSION: 24) are already above the 22.15 floor.Verification (local, host Node 24.21)
pnpm lint: 0 errors. The one warning is inAdmin.tsx.pnpm typecheck: clean.vitest --project server test/tracing.test.ts: 5/5 pass.Risk for the 10 Nov post
Low. The change is confined to the opt-in tracing and audit-export paths, and both are off by default. Runtime behaviour is unchanged, apart from the explicit context-manager registration needed on 3.x. The main residual risk is OTLP export against a real collector, which no test here covers.
🤖 Generated with Claude Code
Draft opened by Oli's repos agent.