Use failExceptionally in PeriodicMetricReader when exporter is busy#8525
Use failExceptionally in PeriodicMetricReader when exporter is busy#8525vivekp14 wants to merge 10 commits into
Conversation
|
|
Fix indentation in PeriodicMetricReader.java
|
As it says next to the spotless violations:
|
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #8525 +/- ##
============================================
- Coverage 78.54% 78.51% -0.03%
- Complexity 8468 8602 +134
============================================
Files 1008 1013 +5
Lines 28824 29148 +324
Branches 3569 3631 +62
============================================
+ Hits 22639 22887 +248
- Misses 5342 5419 +77
+ Partials 843 842 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Build is now passing. I noticed the patch coverage is at 50% — happy to add a test covering the forceFlush failure path if that would help get this merged. |
|
@vivekp14 Yes, please add/modify tests. Make sure to test the tests by breaking it to see the test fail. |
Add test for forceFlush behavior during in-flight export
Fixes #8433
When forceFlush() is called while a periodic export is already in
progress, PeriodicMetricReader was silently failing with plain fail().
Updated to use failExceptionally(IllegalStateException) so callers
can inspect the cause via CompletableResultCode#getFailureThrowable().
Also added JavaDoc to forceFlush() documenting this edge case.