[PR #9086] fix(core): move @opentelemetry/api from peerDependencies to dependencies #25328

Open
opened 2026-04-15 22:50:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/9086
Author: @aarmful
Created: 4/10/2026
Status: 🔄 Open

Base: main ← Head: fix/otel-api-missing-dependency


📝 Commits (1)

  • 3494e82 fix(core): move @opentelemetry/api to dependencies

📊 Changes

3 files changed (+44 additions, -9 deletions)

View changed files

📝 packages/core/package.json (+1 -1)
📝 packages/core/src/instrumentation/instrumentation.test.ts (+35 -0)
📝 pnpm-lock.yaml (+8 -8)

📄 Description

fixes #8765

@opentelemetry/api was only in peerDependencies, so running yarn dlx auth@latest would fail with ERR_MODULE_NOT_FOUND at startup. peer deps aren't installed in that context. moved it to dependencies, following the same pattern as @opentelemetry/semantic-conventions.

also adds regression tests for withSpan with no provider registered.


Summary by cubic

Move @opentelemetry/api to runtime dependencies to prevent startup errors (ERR_MODULE_NOT_FOUND) in dlx installs. Add regression tests for withSpan when no provider is registered.

  • Bug Fixes
    • Move @opentelemetry/api from peerDependencies to dependencies to ensure it installs in yarn dlx contexts; aligns with @opentelemetry/semantic-conventions.
    • Add tests for withSpan no-op behavior (sync/async returns and error propagation) when no SDK/provider is registered.

Written for commit 3494e82947. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/9086 **Author:** [@aarmful](https://github.com/aarmful) **Created:** 4/10/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/otel-api-missing-dependency` --- ### 📝 Commits (1) - [`3494e82`](https://github.com/better-auth/better-auth/commit/3494e8294747bf661fed3d9df4e6be45657e75a7) fix(core): move @opentelemetry/api to dependencies ### 📊 Changes **3 files changed** (+44 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/package.json` (+1 -1) 📝 `packages/core/src/instrumentation/instrumentation.test.ts` (+35 -0) 📝 `pnpm-lock.yaml` (+8 -8) </details> ### 📄 Description fixes #8765 `@opentelemetry/api` was only in `peerDependencies`, so running `yarn dlx auth@latest` would fail with `ERR_MODULE_NOT_FOUND` at startup. peer deps aren't installed in that context. moved it to `dependencies`, following the same pattern as `@opentelemetry/semantic-conventions`. also adds regression tests for `withSpan` with no provider registered. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Move `@opentelemetry/api` to runtime `dependencies` to prevent startup errors (`ERR_MODULE_NOT_FOUND`) in dlx installs. Add regression tests for `withSpan` when no provider is registered. - **Bug Fixes** - Move `@opentelemetry/api` from `peerDependencies` to `dependencies` to ensure it installs in `yarn dlx` contexts; aligns with `@opentelemetry/semantic-conventions`. - Add tests for `withSpan` no-op behavior (sync/async returns and error propagation) when no SDK/provider is registered. <sup>Written for commit 3494e8294747bf661fed3d9df4e6be45657e75a7. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 22:50:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#25328