Documentation Index
Fetch the complete documentation index at: https://mintlify.com/helicone/helicone/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Session Metrics endpoint provides statistical analysis of session performance, including percentile distributions for session count, duration, and cost. This is useful for understanding typical session patterns and identifying outliers.Request Parameters
Filter sessions by session name (partial match)
Timezone offset in minutes from UTC
Percentile size for histogram calculationsOptions:
p50, p75, p95, p99, p99.9Use interquartile range for outlier detection
Advanced filter node for complex queries
Response Fields
Session metrics data
Average metrics across all sessions
Example Request
Example Response
Understanding Percentiles
ThepSize parameter controls which percentile to use for histogram bucketing:
- p50 (median): Half of sessions fall below this value
- p75: 75% of sessions fall below this value
- p95: 95% of sessions fall below this value - useful for SLA monitoring
- p99: 99% of sessions fall below this value - helps identify outliers
- p99.9: Captures extreme outliers
Use Cases
- Performance monitoring: Track session duration trends over time
- Cost analysis: Understand cost distribution across sessions
- Capacity planning: Identify typical session patterns for scaling
- Anomaly detection: Use high percentiles (p95, p99) to spot unusual behavior
- SLA compliance: Monitor percentile-based service level objectives
Interquartile Range
WhenuseInterquartile is set to true, the metrics use the interquartile range (IQR) method for outlier detection. This provides a more robust statistical view by focusing on the middle 50% of data and reducing the impact of extreme outliers.