SentryMetrics.stop_ttfb_metrics and stop_processing_metrics called the base FrameProcessorMetrics implementation but discarded its return value (implicit `return None`). FrameProcessorMetrics.stop_ttfb_metrics / stop_processing_metrics build and return a MetricsFrame, which FrameProcessor.stop_ttfb_metrics / stop_processing_metrics then pushes downstream so observers (e.g. UserBotLatencyObserver, MetricsLogObserver) can see TTFB / processing metrics. Because SentryMetrics returned None, the FrameProcessor never pushed the MetricsFrame, so any pipeline using metrics=SentryMetrics() on STT / LLM / TTS services silently lost all downstream TTFB and processing MetricsFrames. The metrics were still calculated and logged internally, and Sentry transactions still finished correctly, but observers never saw them. Forward the MetricsFrame returned by the base class so FrameProcessor can push it into the pipeline.
2 lines
572 B
Markdown
2 lines
572 B
Markdown
- 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.
|