Quickstart
Get started with tracing sessions with HoneyHive
With HoneyHive, we allow users to track:
- Model inference calls as
model
events - External API calls (like retrieval) as
tool
events - Groups of inference & external API calls as
chain
events - An entire trace of requests as a
session
Logging a Trace
We use OpenTelemetry to automatically instrument your AI application.
You can find the full list of supported packages here.
Prerequisites
- You have already created a project in HoneyHive, as explained here.
- You have an API key for your project, as explained here.
Expected Time: 5 minutes
Steps
Installation
To install our SDKs, run the following commands in the shell.
Authenticate the SDK & initialize the tracer
Initializing the HoneyHiveTracer
marks the beginning of your session
and allows you to begin tracing your program.
To initialize, pass the following parameters:
api_key
: Get your API key from HoneyHive Account Settings.project
: Create a project from HoneyHive Projects.- (optional)
source
: The source of the trace, e.g. “prod”, “dev”, etc. Defaults to “dev”. - (optional)
session_name
: The name of the session, defaults to the main module name.
Structure your traces using function decorators
The above initialization will auto-capture all interactions with our supported providers.
To capture anything else, you can trace any function in your code and see its inputs, outputs, errors, duration, etc. by decorating it as follows.
View the trace
Now that you have successfully traced your session, you can review it in the platform.
- Navigate to the project in the platform via the projects page or the dropdown in the Header.
- Follow these steps after
Learn more
Observability Tutorial
An end-to-end tutorial for tracing a complex RAG application with the tracer.
Tracer Troubleshooting
Learn how to troubleshoot common issues with our tracers.
Enriching traces
How to enrich your traces and spans with feedback, metrics and more.
Data Model Overview
Learn how HoneyHive’s core data model works.