Analytics & Monitoring
Sentry Metrics
Performance monitoring integration with Sentry for Pipecat frame processors
Overview
SentryMetrics
extends FrameProcessorMetrics
to provide performance monitoring integration with Sentry. It tracks Time to First Byte (TTFB) and processing duration metrics for frame processors.
Installation
To use Sentry metrics, install the Sentry SDK:
Configuration
Sentry must be initialized in your application before metrics will be collected:
Usage Example
Transaction Information
Each transaction includes:
- Operation type (
ttfb
orprocessing
) - Description with processor name
- Start timestamp
- End timestamp
- Unique transaction ID
Fallback Behavior
If Sentry is not available (not installed or not initialized):
- Warning logs are generated
- Metric methods execute without error
- No data is sent to Sentry
Notes
- Requires Sentry SDK to be installed and initialized
- Thread-safe metric collection
- Automatic transaction management
- Supports selective TTFB reporting
- Integrates with Sentry’s performance monitoring
- Provides detailed timing information
- Maintains timing data even when Sentry is unavailable