fix(deps): bump OpenTelemetry experimental packages to ^0.217.0 (consumer-facing vuln)#1014
fix(deps): bump OpenTelemetry experimental packages to ^0.217.0 (consumer-facing vuln)#1014doronkopit5 wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThis PR updates OpenTelemetry instrumentation dependencies from ChangesOpenTelemetry Instrumentation Package Version Alignment
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/instrumentation-vertexai/src/aiplatform-instrumentation.ts`:
- Line 105: The wrapper functions declare their rest parameter incorrectly as
`...args: any`; update the signatures to `...args: any[]` so the rest parameter
is typed as an array/tuple; specifically change the wrapper signature `function
method(this: any, ...args: any)` in the aiplatform instrumentation (and the
analogous wrapper `method` signatures in the qdrant, cohere, and bedrock
instrumentation files) to `function method(this: any, ...args: any[])`, keeping
all other logic unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 79b4e005-4967-49e1-bbe0-f40bb8eed703
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (16)
packages/instrumentation-anthropic/package.jsonpackages/instrumentation-bedrock/package.jsonpackages/instrumentation-chromadb/package.jsonpackages/instrumentation-cohere/package.jsonpackages/instrumentation-google-generativeai/package.jsonpackages/instrumentation-langchain/package.jsonpackages/instrumentation-llamaindex/package.jsonpackages/instrumentation-mcp/package.jsonpackages/instrumentation-openai/package.jsonpackages/instrumentation-pinecone/package.jsonpackages/instrumentation-qdrant/package.jsonpackages/instrumentation-together/package.jsonpackages/instrumentation-vertexai/package.jsonpackages/instrumentation-vertexai/src/aiplatform-instrumentation.tspackages/sample-app/package.jsonpackages/traceloop-sdk/package.json
Addresses the high-severity advisory in @opentelemetry/sdk-node
(<0.217.0, Prometheus exporter crash) — the only Dependabot critical/high
that reaches consumers of the published packages, since the lockfile is
not published and consumer installs re-resolve declared ranges.
- Bump @opentelemetry/{sdk-node,instrumentation,exporter-trace-otlp-proto}
from ^0.203.0 to ^0.217.0 across all packages, coordinated to avoid two
copies of @opentelemetry/instrumentation in a consumer's tree.
- Raise production dependency floors to patched versions: lodash ^4.18.1
(instrumentation-llamaindex) and uuid ^11.1.1 (traceloop-sdk).
- vertexai: simplify wrapperMethod arg typing to `...args: any[]` (it
previously over-specified the predict overload union) because
@opentelemetry/instrumentation@0.217 tightened _wrap's wrapper types;
runtime behavior is unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
47fe042 to
2574de6
Compare
Solves #1013
Summary
Addresses Dependabot critical/high alerts with a focus on consumer safety — ensuring nobody who
npm installs the published@traceloop/*packages inherits a vulnerable dependency.The key finding
Of the 5 critical + 54 high open alerts, only one actually reaches consumers in an unfixed state:
@opentelemetry/sdk-node(high — Prometheus exporter crash), declared^0.203.0intraceloop-sdk(patch is0.217.0, out of range).Everything else is either:
npm installresolves to a fixed version (e.g.protobufjsviagoogle-gax ^7.3.2→ 7.5.x,langsmithvia@langchain/core→ 0.7.x). Only this repo's (unpublished) lockfile showed the old versions.handlebars,convict,fast-xml-parser) and remaining highs (axios,undici,tar,rollup,minimatch,hono, …) arrive solely through test SDKs and build/release tooling (cohere-ai,@aws-sdk/*,@qdrant/js-client-rest,lerna,nx,rollup,eslint,mocha). They are never in any published package's production closure.Why so few matter: the lockfile isn't published and
pnpm.overridesonly affect this repo — consumer safety is governed solely by the declareddependenciesranges in publishedpackage.jsonfiles.Changes
^0.203.0→^0.217.0for@opentelemetry/sdk-node,@opentelemetry/instrumentation, and@opentelemetry/exporter-trace-otlp-protoacross all packages. The coordination prevents two copies of@opentelemetry/instrumentation(0.203 vs 0.217) in a consumer's tree.lodash ^4.18.1(instrumentation-llamaindex),uuid ^11.1.1(traceloop-sdk) — guarantees consumers get the patched version of these directly-declared prod deps.instrumentation-vertexaitype fix:@opentelemetry/instrumentation@0.217tightened the typing of_wrap's wrapper argument, which conflicted with vertexai's explicitly-typedwrapperMethod(it spelled out thepredictoverload union). Simplified its signature tofunction method(this: any, ...args: any[])and dropped the now-unusedgoogle-gaxtype import. Runtime behavior is unchanged (type-only adjustment).Verification
pnpm nx run-many -t build— all 17 projects build.pnpm nx run-many -t test— all suites pass exceptinstrumentation-qdrant, which fails locally only withECONNREFUSED 127.0.0.1:6333(its tests require a live Qdrant server, provided by the CI service container — pre-existing/environmental, unchanged by this PR).@opentelemetry/{sdk-node,instrumentation,exporter-trace-otlp-proto}resolve to a single0.217.0;lodash/uuidresolve to patched.Out of scope (intentionally)
Dev/build-only and auto-fixable lockfile alerts were not chased — they don't reach consumers, and clearing them would mean either
pnpm.overrideschurn or a full lockfile regeneration for no consumer benefit.Summary by CodeRabbit