Skip to content

fix(e2e): Pin @opentelemetry/api to 1.9.0 in ts3.8 test app - #19992

Merged
logaretm merged 1 commit into
developfrom
fix/pin-otel-api-ts38
Mar 26, 2026
Merged

fix(e2e): Pin @opentelemetry/api to 1.9.0 in ts3.8 test app#19992
logaretm merged 1 commit into
developfrom
fix/pin-otel-api-ts38

Conversation

@logaretm

@logaretmlogaretm commented Mar 26, 2026

Copy link
Copy Markdown
Member

Summary

  • @opentelemetry/api@1.9.1 was released on Mar 25 and introduced export { Foo, type Bar } syntax (inline type modifiers) in its .d.ts files, which requires TypeScript 4.5+
  • The generic-ts3.8 E2E test runs with skipLibCheck: false and TypeScript 3.8, so it tries to parse OTel's types and fails
  • This pins @opentelemetry/api to 1.9.0 in the ts3.8 test app via pnpm.overrides
  • We can't pin repo-wide in published packages because OTel uses a global singleton pattern — version mismatches with @opentelemetry/sdk-trace-base cause the tracer to become a no-op
  • Our published .d.ts files are unaffected — only OTel's own types use the incompatible syntax

Test plan

  • Verified locally: yarn test:run generic-ts3.8 passes with the pin
  • CI E2E generic-ts3.8 Test should go green

🤖 Generated with Claude Code

Closes#19998 (added automatically)

@opentelemetry/api@1.9.1 (released Mar 25) introduced inline type
modifiers (`export { Foo, type Bar }`) in its type definitions, which
requires TypeScript 4.5+. This breaks the generic-ts3.8 E2E test that
type-checks with `skipLibCheck: false` using TypeScript 3.8.
Pin to 1.9.0 via pnpm overrides to restore compatibility.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

github-actionsBot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (node) Add nodeRuntimeMetricsIntegration by chargome in #19923
  • (nuxt) Support parametrized SSR routes in Nuxt 5 by s1gr1d in #19977

Bug Fixes 🐛

  • (e2e) Pin @opentelemetry/api to 1.9.0 in ts3.8 test app by logaretm in #19992
  • (opentelemetry) Convert seconds timestamps in span.end() to milliseconds by logaretm in #19958

Documentation 📚

  • (release) Update publishing-a-release.md by nicohrubec in #19982

Internal Changes 🔧

  • (core) Consolidate getOperationName into one shared utility by nicohrubec in #19971
  • (deno) Expand Deno E2E test coverage by chargome in #19957

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

PathSize% ChangeChange
@sentry/browser25.69 kB+0.2%+49 B 🔺
@sentry/browser - with treeshaking flags24.17 kB+0.14%+33 B 🔺
@sentry/browser (incl. Tracing)42.67 kB+0.13%+54 B 🔺
@sentry/browser (incl. Tracing, Profiling)47.33 kB+0.12%+55 B 🔺
@sentry/browser (incl. Tracing, Replay)81.48 kB+0.08%+57 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags71.06 kB+0.1%+69 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas)86.17 kB+0.06%+50 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback)98.41 kB+0.04%+36 B 🔺
@sentry/browser (incl. Feedback)42.48 kB+0.08%+30 B 🔺
@sentry/browser (incl. sendFeedback)30.35 kB+0.15%+44 B 🔺
@sentry/browser (incl. FeedbackAsync)35.4 kB+0.12%+39 B 🔺
@sentry/browser (incl. Metrics)26.96 kB+0.14%+37 B 🔺
@sentry/browser (incl. Logs)27.1 kB+0.12%+32 B 🔺
@sentry/browser (incl. Metrics & Logs)27.78 kB+0.15%+39 B 🔺
@sentry/react27.45 kB+0.22%+58 B 🔺
@sentry/react (incl. Tracing)45.01 kB+0.14%+60 B 🔺
@sentry/vue30.13 kB+0.16%+46 B 🔺
@sentry/vue (incl. Tracing)44.52 kB+0.09%+39 B 🔺
@sentry/svelte25.7 kB+0.16%+40 B 🔺
CDN Bundle28.35 kB+0.27%+75 B 🔺
CDN Bundle (incl. Tracing)43.57 kB+0.15%+62 B 🔺
CDN Bundle (incl. Logs, Metrics)29.22 kB+0.27%+77 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics)44.43 kB+0.17%+75 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics)68.3 kB+0.13%+86 B 🔺
CDN Bundle (incl. Tracing, Replay)80.41 kB+0.1%+73 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)81.31 kB+0.1%+76 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback)85.97 kB+0.12%+103 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)86.85 kB+0.1%+85 B 🔺
CDN Bundle - uncompressed82.7 kB+0.1%+77 B 🔺
CDN Bundle (incl. Tracing) - uncompressed128.62 kB+0.05%+64 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed85.57 kB+0.1%+77 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed131.49 kB+0.05%+64 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed209.22 kB+0.05%+102 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed245.5 kB+0.04%+89 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed248.35 kB+0.04%+89 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed258.41 kB+0.04%+89 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed261.26 kB+0.04%+89 B 🔺
@sentry/nextjs (client)47.4 kB+0.08%+36 B 🔺
@sentry/sveltekit (client)43.12 kB+0.12%+51 B 🔺
@sentry/node-core56.46 kB+0.2%+112 B 🔺
@sentry/node173.49 kB+0.2%+337 B 🔺
@sentry/node - without tracing96.47 kB+0.13%+123 B 🔺
@sentry/aws-serverless113.48 kB+0.13%+142 B 🔺

View base workflow run

@logaretmlogaretm changed the title fix(e2e): Pin @opentelemetry/api to 1.9.0 in ts3.8 test appfix: Pin @opentelemetry/api to 1.9.0 across all SDK packagesMar 26, 2026
@logaretm
logaretm marked this pull request as ready for review March 26, 2026 15:18
@github-actions

Copy link
Copy Markdown
Contributor

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

ScenarioRequests/s% of BaselinePrev. Requests/sChange %
GET Baseline11,176-9,043+24%
GET With Sentry1,97918%1,673+18%
GET With Sentry (error only)7,65468%6,094+26%
POST Baseline1,294-1,202+8%
POST With Sentry62648%588+6%
POST With Sentry (error only)1,13788%1,059+7%
MYSQL Baseline3,494-3,246+8%
MYSQL With Sentry48114%451+7%
MYSQL With Sentry (error only)2,93384%2,637+11%

View base workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents downstream TypeScript build failures by pinning @opentelemetry/api to 1.9.0 (instead of ^1.9.0) so consumers don’t accidentally resolve to 1.9.1, whose .d.ts output requires TypeScript 4.5+.

Changes:

  • Replaced @opentelemetry/api dependency ranges (^1.9.0) with an exact version (1.9.0) across affected SDK packages.
  • Updated both dependencies and (where applicable) peerDependencies/devDependencies to ensure the pin applies for both runtime installs and local development.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/aws-serverless/package.jsonPins @opentelemetry/api to 1.9.0 to avoid consumers resolving to 1.9.1.
packages/cloudflare/package.jsonPins @opentelemetry/api to 1.9.0 to avoid TypeScript incompatibility issues.
packages/deno/package.jsonPins @opentelemetry/api to 1.9.0 for stable consumer installs.
packages/hono/package.jsonPins @opentelemetry/api to 1.9.0 to prevent transitive upgrade to 1.9.1.
packages/nestjs/package.jsonPins @opentelemetry/api to 1.9.0 for compatibility with older TS toolchains.
packages/nextjs/package.jsonPins @opentelemetry/api to 1.9.0 to avoid incompatible .d.ts syntax in 1.9.1.
packages/node/package.jsonPins @opentelemetry/api to 1.9.0 for deterministic dependency resolution.
packages/node-core/package.jsonPins @opentelemetry/api to 1.9.0 in both peer + dev deps to prevent consumers using 1.9.1.
packages/opentelemetry/package.jsonPins @opentelemetry/api to 1.9.0 in peer + dev deps to enforce compatibility.
packages/react-router/package.jsonPins @opentelemetry/api to 1.9.0 to block transitive 1.9.1.
packages/remix/package.jsonPins @opentelemetry/api to 1.9.0 to prevent TS <4.5 typecheck failures.
packages/tanstackstart-react/package.jsonPins @opentelemetry/api to 1.9.0 to keep consumer installs TS-compatible.
packages/vercel-edge/package.jsonPins @opentelemetry/api to 1.9.0 to avoid resolving to 1.9.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment threadpackages/opentelemetry/package.json Outdated
},
"peerDependencies": {
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/api": "1.9.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact-pinned peerDependencies will break user installs

High Severity

Pinning @opentelemetry/api to exactly 1.9.0 in peerDependencies (in @sentry/opentelemetry and @sentry/node-core) will cause ERESOLVE hard errors on npm 7+ for users who have any other version of @opentelemetry/api installed. Since the broader OTel ecosystem uses ^1.x peer dep ranges, users with other OTel packages will almost certainly resolve to 1.9.1, conflicting with this exact pin. Peer dependencies don't control what gets installed — only dependencies does — so the pin here doesn't prevent the problematic version but does break installs. The ^1.9.0 range should be kept for peerDependencies.

Additional Locations (1)
Fix in CursorFix in Web

Comment threadpackages/opentelemetry/package.json Outdated
},
"peerDependencies": {
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/api": "1.9.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The peerDependency on @opentelemetry/api is pinned to an exact version ("1.9.0"), which will cause npm install to fail for users with any other version installed.
Severity: HIGH

Suggested Fix

The peerDependencies for @opentelemetry/api should be changed from the exact version "1.9.0" to a more flexible range, such as ">=1.9.0" or "^1.9.0". This allows users to have other compatible 1.x versions of @opentelemetry/api installed in their project without causing installation conflicts, while the version shipped by the SDK is controlled via the dependencies field.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: packages/opentelemetry/package.json#L45
Potential issue: Pinning `@opentelemetry/api` to an exact version `"1.9.0"` in
`peerDependencies` in `packages/opentelemetry/package.json` will cause installation
failures for users. With npm 7+, if a user's project depends on any version of
`@opentelemetry/api` other than exactly `1.9.0` (e.g., `1.9.1`), `npm install` will fail
with an `ERESOLVE` error. This blocks the installation process entirely, preventing
users from installing or updating their dependencies. This is especially problematic for
users of `@sentry/opentelemetry` who are likely to have `@opentelemetry/api` as a direct
dependency in their project.

Did we get this right? 👍 / 👎 to inform future reviews.

@logaretm
logaretmforce-pushed the fix/pin-otel-api-ts38 branch from a6ebae6 to c57b0abCompareMarch 26, 2026 15:47
@logaretmlogaretm changed the title fix: Pin @opentelemetry/api to 1.9.0 across all SDK packagesfix(e2e): Pin @opentelemetry/api to 1.9.0 in ts3.8 test appMar 26, 2026
@logaretm
logaretm merged commit f685a85 into developMar 26, 2026
77 of 79 checks passed
@logaretm
logaretm deleted the fix/pin-otel-api-ts38 branch March 26, 2026 16:37
Sign up for freeto 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.

fix(e2e): Pin @opentelemetry/api to 1.9.0 in ts3.8 test app

4 participants

@logaretm@Lms24@chargome