getsentry / getsentry/sentry-javascript

tRPC server errors not sent from vercel deployment. Local works fine

Đang mở
#17,024 13 bình luận 2 reaction 1 người được giao Được @chargome nhận Xem trên GitHub
Bug Next.js
Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
1.8k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
515

Mô tả

### Is there an existing issue for this?

- [X] I have checked for existing issues [https://github.com/getsentry/sentry-javascript/issues]()
- [X] I have reviewed the documentation [https://docs.sentry.io/]()
- [X] I am using the latest SDK release [https://github.com/getsentry/sentry-javascript/releases]()

### How do you use Sentry?

Sentry Saas ([sentry.io]())

### Which SDK are you using?

@sentry/nextjs

### SDK Version

9.38.0

### Framework Version

15.4.1

### Link to Sentry event

*No response*

### Reproduction Example/SDK Setup

[https://github.com/studie-tech/TheNinjaRPG]()

I believe the most relevant files are:

```
https://github.com/studie-tech/TheNinjaRPG/blob/main/app/instrumentation.ts
https://github.com/studie-tech/TheNinjaRPG/blob/main/app/sentry.server.config.ts
https://github.com/studie-tech/TheNinjaRPG/blob/main/app/src/app/api/trpc/%5Btrpc%5D/route.ts
```

Specifically, I have implemented `Sentry.flush` as I thought that was the most likely culprit, but to no avail.

### Steps to Reproduce

Whenever I trigger an error in a tRPC endpoint on purpose, I get the error when working from local, but not when deployed on vercel. The full configuration can be seen here:
[studie-tech/TheNinjaRPG]()

I'm not using environment variables for the DSN, which seems to be a common cause of this. I've gone through the entire setup of Sentry again.

This worked a few months ago when initially set up, but has since then been broken.

### Expected Result

Expect similar behavior on local and vercel deployment

### Actual Result

No errors reported from vercel

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.