Prerequisites

  • A Honeycomb account with a valid API key (sign up for a free trial or purchase a subscription)

    The Honeycomb API key should have the necessary permissions to create datasets and ingest traces

Introduction

Honeycomb is a leading observability platform for understanding and troubleshooting complex systems. This guide will walk you through the steps to integrate Langtrace with Honeycomb, enabling you to visualize and analyze the traces generated by Langtrace.

Installation

  • Install the Honeycomb OpenTelemetry Python distribution package:

Alternatively, you can install the libraries directly in your current environment:

Shell
opentelemetry-bootstrap --action=install

Initialize Langtrace

For sending traces to Honeycomb, you do not need a Langtrace API key.

  1. Install langtrace’s SDK and initialize the SDK in your code.

  2. Set the following environment variables to configure the Honeycomb OpenTelemetry Python distribution package:

Shell
export HONEYCOMB_API_ENDPOINT="api.honeycomb.io:443" # US instance
#export HONEYCOMB_API_ENDPOINT="api.eu1.honeycomb.io:443" # EU instance
export OTEL_SERVICE_NAME="your-service-name"
export HONEYCOMB_API_KEY="your-api-key"

Replace your-service-name with a name that describes your Langtrace service, and your-api-key with your actual Honeycomb API key.

Running Langtrace with Honeycomb

Run your Langtrace application using the OpenTelemetry Python automatic instrumentation tool opentelemetry-instrument:

Shell
opentelemetry-instrument python YOUR_LANGTRACE_APPLICATION.py

Replace YOUR_LANGTRACE_APPLICATION.py with the name of your Langtrace application’s main file.

Verification

After running your Langtrace application, you should see traces generated in Honeycomb. In the Honeycomb UI, you can now visualize and analyze the incoming requests and outgoing LLM calls made by your Langtrace application.

Example Screenshot

Here’s an example screenshot of what you can expect to see in Honeycomb after integrating Langtrace:

This screenshot shows an example trace generated by Langtrace, including the request and response metadata, as well as the trace spans and events.

Example Code

For a complete example of how to integrate Langtrace with Honeycomb, please refer to our example code repository

Additional Honeycomb Configuration

For more advanced configuration options or to send data using Go, Typescript and other languages, please refer to the Honeycomb documentation: