Merge pull request #4325 from radhikagpt1208/fix/sentry-metrics-drop-metricsframe

Fix SentryMetrics dropping MetricsFrame from stop_ttfb/stop_processing
This commit is contained in:
Mark Backman
2026-04-21 07:57:42 -04:00
committed by GitHub
2 changed files with 17 additions and 2 deletions

1
changelog/4325.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed `SentryMetrics` silently dropping `MetricsFrame`s from `stop_ttfb_metrics` and `stop_processing_metrics`. `SentryMetrics` called the base `FrameProcessorMetrics` implementation but discarded its return value, so `FrameProcessor` never pushed the `MetricsFrame` downstream. This prevented observers (e.g. `UserBotLatencyObserver`, `MetricsLogObserver`) from seeing TTFB and processing metrics for any service using `metrics=SentryMetrics()`. The metrics were still calculated and Sentry transactions still completed — only the downstream frame push was affected.