getsentry / getsentry/sentry-java
Session seq is raw epoch millis; duration is masked with Math.abs
- 主要言語
- Kotlin
- スター
- 1.4k
- フォーク
- 478
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 67
説明
Audit finding **C2 — theoretical, LOW-MEDIUM**.
`Session` uses raw epoch millis for `seq` and `Math.abs` for duration (`sentry/src/main/java/io/sentry/Session.java`):
* `seq` is set from `getSequenceTimestamp()`, which returns `timestamp.getTime()` (raw epoch millis) — `Session.java:309`, invoked from the session-update path at `:227`. A backward clock step between updates → the newer update has a smaller `seq` → the server can discard the latest session state (lost end/error counts).
* `calculateDurationTime` uses `Math.abs``(timestamp.getTime() - started.getTime())` (`Session.java:240`), which masks negative durations rather than surfacing them.
Source: [JAVA-557]() §C2.
コントリビューションガイド
調査の方向性
Read sentry/src/main/java/io/sentry/Session.java, especially the session-update path around line 227, calculateDurationTime around line 240, and getSequenceTimestamp around line 309. Trace how clock changes affect sequence ordering and duration handling, then identify the relevant existing tests or test entry points. Done means the reported clock-step cases are handled without losing newer session state or masking negative durations.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- observability
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100