# Traceloop and OpenLLMetry - Docs

There are two ways to bring [Traceloop](https://www.traceloop.com/) data into PostHog for analysis:

-   **Direct OpenTelemetry** (recommended) – Instrument your app with [OpenLLMetry](https://www.traceloop.com/docs/openllmetry/introduction) and send OTel spans directly to PostHog.
-   **Traceloop's managed platform** – Use Traceloop's cloud product and enable their PostHog integration.

We also offer a dashboard template to help you quickly get insights into your LLM product.

## Option 1: Direct OpenTelemetry (recommended)

PostHog natively supports OTel spans from [OpenLLMetry](https://www.traceloop.com/docs/openllmetry/introduction), Traceloop's open-source instrumentation library. OpenLLMetry provides auto-instrumentation for 20+ LLM libraries including OpenAI, Anthropic, LangChain, Cohere, Bedrock, and VertexAI.

When you send OpenLLMetry spans to PostHog, they are automatically:

-   Classified as `$ai_generation` or `$ai_embedding` events based on the request type
-   Normalized so input/output messages, token usage, and tools map to PostHog's standard AI Observability properties

To get started, configure OpenLLMetry to export traces to PostHog's OTel endpoint. See the [OpenLLMetry documentation](https://www.traceloop.com/docs/openllmetry/introduction) for setup instructions specific to your language and framework.

## Option 2: Via Traceloop's managed platform

1.  Sign up for [Traceloop](https://www.traceloop.com/) and add it to your app.
2.  Go to the [integrations page](https://app.traceloop.com/settings/integrations) in your Traceloop dashboard and click on the PostHog card.

3.  Enter in your PostHog host and project token (you can find these in your [PostHog project settings](https://us.posthog.com/settings/project)).
4.  Select the environment you want to connect to PostHog and click **Enable**.

Traceloop will now send events to PostHog under the name `traceloop span`.

## Using the Traceloop dashboard template

Once you've installed the integration, our Traceloop [dashboard template](/docs/product-analytics/dashboards.md) helps you quickly set up relevant insights. You can see an [example dashboard here](https://us.posthog.com/shared/tpX9kUd5BbGkdjxQE8YhCskNuYA7Jw).

To create your own dashboard from a template:

1.  Go the [dashboard tab](https://us.posthog.com/dashboard) in PostHog.
2.  Click the **New dashboard** button in the top right.
3.  Select **LLM metrics – Traceloop** from the list of templates.

### Community questions

Ask a question

### Was this page useful?

HelpfulCould be better