Quick Start
Useenrich_session() to add metrics to the entire trace, or enrich_span() to add metrics to a specific operation.
On the Session
Add metrics that apply to the entire trace:On a Span
Add metrics to a specific function or operation:Concepts
Client-Side vs Server-Side Evaluations
| Aspect | Client-Side | Server-Side |
|---|---|---|
| When | During execution | After ingestion |
| Latency | Adds to request time | No impact on request |
| Best for | Guardrails, format checks | LLM-as-judge, complex evals |
| Setup | Code in your app | Configure in HoneyHive |
Client-side metrics are not overwritten by server-side evaluators with the same name.
Metrics Schema
Themetrics object accepts any structure:
Data Types
| Type | Available Measurements | Use Case |
|---|---|---|
| Boolean | True/False percentage | Pass/fail checks |
| Number | Sum, Avg, Median, Min, Max, P95, P98, P99 | Scores, latencies |
| String | Filters and group by | Classifications |
Nested Data
Access nested fields when charting:metrics.step_evals.0.passed
Nesting limits: Max 5 levels of nested objects, max 2 levels of nested arrays.
Learn More
Chart metrics
Visualize metrics in dashboards
Server-side evaluators
Run evaluations post-ingestion
LLM evaluators
Use LLMs to evaluate outputs
Human annotations
Set up expert review queues
SDK Reference
- Python SDK Reference -
enrich_session(),enrich_span()

