getsentry / getsentry/sentry-java

`ClassNotFoundException` for `SentryReactorUtils` when excluding the `sentry-reactor` dependency

未關閉
#4,789 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
Bug Errors Java
主要語言
Kotlin
星號
1.4k
分支
478
平均合併
3 天 4 小時
30 天內合併 PR
72

描述

### Integration

sentry

### Java Version

17

### Version

8.23.0

### Steps to Reproduce

Use `spring-boot-jakarta` dependency but exclude `sentry-reactor` dependency in WebFlux sample. Have a `@GetMapping` method that throws an exception.

### Expected Result

Exception captured to Sentry

We could have a `SentryWebExceptionHandlerWithThreadLocalAccessor` in addition to `SentryWebExceptionHandler`, then have `SentryWebExceptionHandler` not use `SentryReactor`. This would mimic what we do for `SentryWebFilterWithThreadLocalAccessor` and `SentryWebFilter`.

### Actual Result

`Caused by: java.lang.ClassNotFoundException: io.sentry.reactor.SentryReactorUtils`

and

`reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response`

and the `ClassNotFoundException` is reported to Sentry instead of the real exception.

貢獻指南

開啟貢獻指南

研究方向

從 spring-boot-jakarta WebFlux 範例開始,在排除 sentry-reactor 後重現此故障。比較 SentryWebExceptionHandler、SentryWebFilter 與 SentryWebFilterWithThreadLocalAccessor;完成的標準是擷取到真正的 exception,且不會出現 SentryReactorUtils ClassNotFoundException。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java, spring-boot
領域
backend
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。