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
平均合并
2 天 23 小时
30 天内合并 PR
67

描述

### 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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。