Skip to content

Commit 244d54e

Browse files
committed
Merge branch 'main' into feat/allow-turning-off-auto-init-in-otel-agent
2 parents 1d17816 + 61132a2 commit 244d54e

File tree

5 files changed

+368
-60
lines changed

5 files changed

+368
-60
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Fixes
66

7+
- Updated ProfileMeasurementValue types ([#2412](https://github.com/getsentry/sentry-java/pull/2412))
78
- Clear window reference only on activity stop in profileMeasurements collector ([#2407](https://github.com/getsentry/sentry-java/pull/2407))
89
- No longer disable OpenTelemetry exporters in default Java Agent config ([#2408](https://github.com/getsentry/sentry-java/pull/2408))
910
- Fix `ClassNotFoundException` for `io.sentry.spring.SentrySpringServletContainerInitializer` in `sentry-spring-jakarta` ([#2411](https://github.com/getsentry/sentry-java/issues/2411))

sentry-android-core/src/main/java/io/sentry/android/core/AndroidTransactionProfiler.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ public void onFrameMetricCollected(
198198
@NotNull FrameMetrics frameMetrics, float refreshRate) {
199199
long frameTimestampRelativeNanos =
200200
SystemClock.elapsedRealtimeNanos() - transactionStartNanos;
201+
202+
// We don't allow negative relative timestamps.
203+
// So we add a check, even if this should never happen.
204+
if (frameTimestampRelativeNanos < 0) {
205+
return;
206+
}
201207
long durationNanos = frameMetrics.getMetric(FrameMetrics.TOTAL_DURATION);
202208
// Most frames take just a few nanoseconds longer than the optimal calculated
203209
// duration.

0 commit comments

Comments
 (0)