File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 55### Fixes
66
77- Remove profiling timeout logic and disable profiling on API 21 ([ #3478 ] ( https://github.com/getsentry/sentry-java/pull/3478 ) )
8+ - Properly reset metric flush flag on metric emission ([ #3493 ] ( https://github.com/getsentry/sentry-java/pull/3493 ) )
89
910## 7.10.0
1011
Original file line number Diff line number Diff line change @@ -239,6 +239,8 @@ public void flush(boolean force) {
239239 force = true ;
240240 }
241241
242+ flushScheduled = false ;
243+
242244 final @ NotNull Set <Long > flushableBuckets = getFlushableBuckets (force );
243245 if (flushableBuckets .isEmpty ()) {
244246 logger .log (SentryLevel .DEBUG , "Metrics: nothing to flush" );
Original file line number Diff line number Diff line change @@ -312,6 +312,19 @@ class MetricsAggregatorTest {
312312
313313 // there is no other metric to capture, so flush is not scheduled again
314314 assertFalse(fixture.executorService.hasScheduledRunnables())
315+
316+ // once another metric is emitted
317+ aggregator.increment(
318+ " name1" ,
319+ 1.0 ,
320+ MeasurementUnit .Custom (" unit0" ),
321+ mapOf (" key0" to " value0" ),
322+ 20_001 ,
323+ null
324+ )
325+
326+ // then flush should be scheduled again
327+ assertTrue(fixture.executorService.hasScheduledRunnables())
315328 }
316329
317330 @Test
You can’t perform that action at this time.
0 commit comments