From d0ecb3c7a8bee801878015f99000d8d8a68403fc Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Mon, 2 Mar 2026 16:24:21 -0500 Subject: [PATCH] Revert "Deprecate processing metrics (ProcessingMetricsData)" (#3852) This reverts commit 127b52bad5309d5e6b3df90a7100f69b49f81c55. --- changelog/3852.deprecated.md | 1 - src/pipecat/metrics/metrics.py | 4 ---- src/pipecat/processors/frame_processor.py | 16 ---------------- .../metrics/frame_processor_metrics.py | 8 -------- 4 files changed, 29 deletions(-) delete mode 100644 changelog/3852.deprecated.md diff --git a/changelog/3852.deprecated.md b/changelog/3852.deprecated.md deleted file mode 100644 index 666c7c58a..000000000 --- a/changelog/3852.deprecated.md +++ /dev/null @@ -1 +0,0 @@ -- Deprecated `ProcessingMetricsData` and `start_processing_metrics()`/`stop_processing_metrics()` on `FrameProcessor` and `FrameProcessorMetrics`. These metrics don't accurately depict a service's performance. Instead, TTFB metrics are recommended. Processing metrics will be removed in the 1.0.0 version. diff --git a/src/pipecat/metrics/metrics.py b/src/pipecat/metrics/metrics.py index 37ab99447..2030306e5 100644 --- a/src/pipecat/metrics/metrics.py +++ b/src/pipecat/metrics/metrics.py @@ -41,10 +41,6 @@ class TTFBMetricsData(MetricsData): class ProcessingMetricsData(MetricsData): """General processing time metrics data. - .. deprecated:: 0.0.104 - Processing metrics are deprecated and will be removed in a future version. - Use TTFB metrics instead. - Parameters: value: Processing time measurement in seconds. """ diff --git a/src/pipecat/processors/frame_processor.py b/src/pipecat/processors/frame_processor.py index 3e7b48442..bfe818696 100644 --- a/src/pipecat/processors/frame_processor.py +++ b/src/pipecat/processors/frame_processor.py @@ -441,35 +441,19 @@ class FrameProcessor(BaseObject): if frame: await self.push_frame(frame) - _processing_metrics_warned = False - async def start_processing_metrics(self, *, start_time: Optional[float] = None): """Start processing metrics collection. - .. deprecated:: 0.0.104 - Processing metrics are deprecated and will be removed in a future version. - Use TTFB metrics instead. - Args: start_time: Optional timestamp to use as the start time. If None, uses the current time. """ if self.can_generate_metrics() and self.metrics_enabled: - if not FrameProcessor._processing_metrics_warned: - FrameProcessor._processing_metrics_warned = True - logger.warning( - "Processing metrics are deprecated and will be removed in a future version. " - "Use TTFB metrics instead." - ) await self._metrics.start_processing_metrics(start_time=start_time) async def stop_processing_metrics(self, *, end_time: Optional[float] = None): """Stop processing metrics collection and push results. - .. deprecated:: 0.0.104 - Processing metrics are deprecated and will be removed in a future version. - Use TTFB metrics instead. - Args: end_time: Optional timestamp to use as the end time. If None, uses the current time. diff --git a/src/pipecat/processors/metrics/frame_processor_metrics.py b/src/pipecat/processors/metrics/frame_processor_metrics.py index ef637b5ad..7a52895a2 100644 --- a/src/pipecat/processors/metrics/frame_processor_metrics.py +++ b/src/pipecat/processors/metrics/frame_processor_metrics.py @@ -150,10 +150,6 @@ class FrameProcessorMetrics(BaseObject): async def start_processing_metrics(self, *, start_time: Optional[float] = None): """Start measuring processing time. - .. deprecated:: 0.0.104 - Processing metrics are deprecated and will be removed in a future version. - Use TTFB metrics instead. - Args: start_time: Optional timestamp to use as the start time. If None, uses the current time. @@ -163,10 +159,6 @@ class FrameProcessorMetrics(BaseObject): async def stop_processing_metrics(self, *, end_time: Optional[float] = None): """Stop processing time measurement and generate metrics frame. - .. deprecated:: 0.0.104 - Processing metrics are deprecated and will be removed in a future version. - Use TTFB metrics instead. - Args: end_time: Optional timestamp to use as the end time. If None, uses the current time.