Skip to main content
HoneyHive combines logs, metrics, and traces into a unified data model, leveraging the concept of high cardinality to provide a comprehensive view of your AI system’s performance and behavior. By consolidating these traditionally separate observability pillars into a single, flexible event-based structure, we enable developers to gain deeper insights and perform more sophisticated analyses. This approach offers several key benefits:
  • Unified Context: Each event captures not just raw data, but also the surrounding context, allowing for more meaningful correlations and insights.
  • Flexible Querying: High cardinality enables precise filtering and aggregation across multiple dimensions, facilitating complex analyses and troubleshooting.
  • Scalability: The event-based model scales efficiently with the growing complexity of AI systems and the increasing volume of observability data.
  • Faster Debugging: The ability to trace a request through various components while simultaneously accessing logs and metrics streamlines the debugging process.

Introducing Events

The base unit of data in HoneyHive is called an event, which represents a span in a trace. A root event in a trace is of the type session, while all non-root events in a trace can be of 3 core types - model, tool and chain.
All events have a parent-child relationship, except session event, which being a root event does not have any parents.
  • session: A root event used to group together multiple model, tool, and chain events into a single trace. This is achieved by having a common session_id across all children.
  • model events: Used to track the execution of any LLM requests.
  • tool events: Used to track execution of any deterministic functions like requests to vector DBs, requests to an external API, regex parsing, document reranking, and more.
  • chain events: Used to group together multiple model and tool events into composable units that can be evaluated and monitored independently. Typical examples of chains include retrieval pipelines, post-processing pipelines, and more.
Here’s a visual representation of the event hierarchy:
All events have the following properties:
  • event_id: A unique identifier for the event.
  • event_type: The type of event. Can be model, tool or chain.
  • event_name: The name of the event. This can be the model name, the tool name, etc.
  • source: The source of the event. This can be “production”, “dev”, etc.
  • session_id: A unique identifier for the session. For a session, all events have the same session_id.
  • project_id: A unique identifier for the project. For a project, all events have the same project_id.
  • start_time: The UTC timestamp (in milliseconds) when the event started.
  • end_time: The UTC timestamp (in milliseconds) when the event ended.
  • duration: The duration of the event in milliseconds. This can be the model latency, the tool latency, etc.
  • config: The configuration of the event. This can be the model configuration, the tool configuration, etc.
  • inputs: The inputs to the event. This can be the prompt, the vector query, etc.
  • outputs: The outputs of the event. This can be a completion, a vector response, an API response, etc.
  • error: The error message of the event. This can be a rate limit error, failed retrieval error, etc.
  • metadata: Additional metadata about the event. This can be the product metadata, error metadata, etc.
  • user_properties: The user properties of the event. This can be the user id, country, tier, etc.
  • metrics: The metrics associated with the event. This can be model metrics, tool metrics, etc.
  • feedback: The feedback for the event. This can be the user feedback, the model feedback, etc.

Session Events

Session events are used to track the execution of your application. These can be used to capture
  • Session configuration like the application version, environment, etc.
  • Session metrics like session latency, session throughput, etc.
  • Session properties like user id, country, tier, etc.
  • Session feedback like overall session feedback, etc.

Schema for Session Events

Properties marked as “Reserved” in the schema are automatically calculated and managed internally by HoneyHive’s auto-tracing system.

Example for Session Events

Here’s an example session event:

Model Events

Model events represent a request made to an LLM. These can be used to capture
  • Model configuration like model name, model hyperparameters, prompt template, etc.
  • Model metrics like completion token count, cost, tokens per second, etc.
  • API-level metrics like request latency, rate limit errors, etc.

Schema for Model Events

Properties marked as reserved are required by HoneyHive for core functionality:
  • Model configuration, inputs, and outputs properties are used for rendering and replaying requests in the HoneyHive playground
  • Token counts and cost metadata are used for aggregating session-level analytics
All other properties are recommendations based on our auto-tracing system and can be customized based on your needs.

Example for Model Events

Here’s an example model event:

Tool Events

When your LLM application interacts with external APIs, databases, or vector databases like Pinecone, you can instrument these interactions to evaluate performance, debug issues, and gain insights. Tool events are used to track the execution of anything other than the model. These can be used to capture
  • Tool configuration like vector index name, vector index hyperparameters, any internal tool configuration, etc.
  • Tool metrics like retrieved chunk similarity, internal tool response validation, etc.
  • API-level metrics like request latency, index errors, internal tool errors, etc.

Schema for Tool Events

The tool event represents an interaction with an external resource. Send the following fields:

Example for Tool Events

Here’s an example tool event:

Chain Events

Chain events help with categorizing the events into different stages of the pipeline. These can be synchronous or asynchronous stages. How Chain Events Work Any event that has its “parent” set to a chain event becomes a step within that chain. This simple mechanism allows you to consolidate various events into a single unit, making it easier to monitor the progress of your pipeline. Nesting for Hierarchy You can also nest chains within each other. This hierarchical approach lets you track the execution of your pipeline in a structured and organized manner. This nesting feature can be particularly useful for complex workflows.
Session Event as a Special Case: As a special case, the “session event” for a pipeline is essentially a chain event with all other events as its children. This means you can encapsulate the entire pipeline within a single session event, making it easy to manage and analyze.
By separating events into chains, you can track properties like:
  • Chain configuration like chain name, chain settings, etc.
  • Chain metrics like chain latency, chain throughput, etc.
Here’s an example chain event:

Next Steps

Refer to our tracing introduction guide to get started with tracing in HoneyHive.

Tracing Introduction

Getting started with tracing in HoneyHive.