getsentry / getsentry/sentry-java

`@SentryCheckIn` always starts a new trace

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

描述

### Integration

sentry

### Java Version

any

### Version

8.27.1

### Steps to Reproduce

https://github.com/getsentry/sentry-java/blob/3699cd5331a4c334c1e8a4bd85aa8e399f5c4231/sentry-samples/sentry-samples-spring-boot-4/src/main/java/io/sentry/samples/spring/boot4/CustomJob.java#L14 creates a transaction.

https://github.com/getsentry/sentry-java/blob/4c4fed9ef005ffc3acaf460ed345c1e700fdeefe/sentry-spring-7/src/main/java/io/sentry/spring7/checkin/SentryCheckInAdvice.java#L91 starts a new trace.

Use our Spring Boot 4 sample to verify.

### Expected Result

`PropagationContext` trace ID matches the transactions trace ID.

### Actual Result

`PropagationContext` trace ID differs from the transactions trace ID.

This might not have any effect in practice because we should be using the span/transaction when retrieving the trace ID.

貢獻指南

開啟貢獻指南

研究方向

從 sentry-samples/sentry-samples-spring-boot-4/.../CustomJob.java 中的 Spring Boot 4 範例以及 sentry-spring-7/.../SentryCheckInAdvice.java 中的 check-in 說明開始。使用該範例重現此行為,然後追蹤 transaction 和 PropagationContext 的 trace ID 是如何取得的。當 PropagationContext 的 trace ID 與 transaction 的 trace ID 相符時,即表示完成。

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

評估

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

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

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