Commit 80a4dab
fix(effect): Add final metrics flush before layer teardown
Before this fix, when SentryEffectMetricsLayer was torn down, the release
effect only cleared previousCounterValues without flushing accumulated
metrics. Since the scoped fiber running the periodic reporter is
interrupted on scope finalization, any metrics accumulated since the
last 10-second flush were silently lost.
This fix adds a final flush before clearing the state, ensuring all
metrics are sent to Sentry before the layer is finalized.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 5b1c7d8 commit 80a4dab
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
0 commit comments