Skip to content

Conversation

@Bigood
Copy link
Contributor

@Bigood Bigood commented Jan 26, 2026

I started having some bugs with the current Prisma version (issue on sentry-javascript repo)

TypeError: request.headers.split is not a function
    at setHeadersOnRequest (…/node_modules/@sentry/node/cjs/integrations/undici/index.js:247:39)
    at _onRequestCreate (…/node_modules/@sentry/node/cjs/integrations/undici/index.js:151:9)
    …

I upgraded beyond v7, and it went fluently, in dev and production. Let me know if there's something more to do before merging !

@netlify
Copy link

netlify bot commented Jan 26, 2026

Deploy Preview for cedarjs canceled.

Name Link
🔨 Latest commit 035a5f6
🔍 Latest deploy log https://app.netlify.com/projects/cedarjs/deploys/69777618743d270008740a29

@nx-cloud
Copy link

nx-cloud bot commented Jan 26, 2026

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 035a5f6

Command Status Duration Result
nx run-many -t test --minWorkers=1 --maxWorkers=4 ✅ Succeeded 1m 58s View ↗
nx run-many -t build:pack --exclude create-ceda... ✅ Succeeded 8s View ↗
nx run-many -t build ✅ Succeeded 8s View ↗
nx run-many -t test:types ✅ Succeeded 10s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-26 14:27:53 UTC

@Tobbe
Copy link
Member

Tobbe commented Jan 26, 2026

@Bigood This is amazing! Thank you so much 🙏

@Tobbe Tobbe marked this pull request as ready for review January 26, 2026 14:36
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 26, 2026

Greptile Overview

Greptile Summary

Updated Sentry SDK from v7 to v10 and @envelop/sentry from v5 to v15 to fix Prisma-related bugs. The migration includes:

  • Upgraded package versions with caret ranges for better flexibility
  • Migrated to new function-based integration API (prismaIntegration(), httpIntegration(), browserTracingIntegration())
  • Removed explicit Prisma client import in favor of auto-discovery
  • Maintained all existing Sentry functionality (error tracking, performance monitoring, GraphQL integration)

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • The changes follow Sentry's official migration path from v7 to v10 and maintain existing functionality. The PR author reports successful testing in dev and production. Score is 4 (not 5) due to the Prisma integration auto-discovery change which should be verified to ensure the Prisma client is correctly discovered without explicit configuration.
  • Verify sentryApi.ts.template to ensure prismaIntegration() correctly auto-discovers the Prisma client in the target environment

Important Files Changed

Filename Overview
packages/cli/src/commands/setup/monitoring/sentry/sentryHandler.ts Updated package versions from v7/v5 to v10/v15 with caret ranges for better version flexibility
packages/cli/src/commands/setup/monitoring/sentry/templates/sentryApi.ts.template Migrated to Sentry v10 integration API, removed Prisma client import (relies on auto-discovery)
packages/cli/src/commands/setup/monitoring/sentry/templates/sentryWeb.ts.template Migrated BrowserTracing to browserTracingIntegration() function-based API

Sequence Diagram

sequenceDiagram
    participant CLI as Cedar CLI
    participant Handler as sentryHandler.ts
    participant NPM as Package Manager
    participant Template as Sentry Templates
    participant App as User Application
    
    CLI->>Handler: Execute setup sentry command
    Handler->>NPM: Install @envelop/sentry@^15
    Handler->>NPM: Install @sentry/node@^10
    Handler->>NPM: Install @sentry/react@^10
    Handler->>NPM: Install @sentry/browser@^10
    Handler->>Template: Generate sentryApi.ts
    Note over Template: Uses prismaIntegration() (auto-discovery)<br/>Uses httpIntegration()
    Template->>App: Create api/lib/sentry.ts
    Handler->>Template: Generate sentryWeb.ts
    Note over Template: Uses browserTracingIntegration()
    Template->>App: Create web/lib/sentry.ts
    Handler->>App: Configure GraphQL handler with useSentry
    Handler->>App: Replace FatalErrorBoundary with Sentry.ErrorBoundary
    Handler->>CLI: Setup complete
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

integrations: [
new Sentry.Integrations.Prisma({ client }),
new Sentry.Integrations.Http({ tracing: true }),
Sentry.prismaIntegration(),
Copy link
Member

Choose a reason for hiding this comment

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

@Bigood Is this even needed now? Looks like prisma might be enabled by default https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/

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