> ## Documentation Index
> Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Laminar

> Learn how to export LLM Gateway traces to Laminar using OpenTelemetry integration.

This guide provides instructions for integrating [Laminar](https://www.lmnr.ai/) with the TrueFoundry AI Gateway to export OpenTelemetry traces.

## What is Laminar?

[Laminar](https://www.lmnr.ai/) is an observability platform for LLM applications. It helps teams capture traces, inspect requests and spans, and monitor behavior across prompts, tools, and model calls.

### Key Features of Laminar

* **LLM and agent tracing**: End-to-end visibility into chains, agents, tool calls, and model responses
* **OpenTelemetry ingestion**: Compatible with OTLP so you can send traces from gateways, SDKs, and custom instrumentation
* **Evaluation and experimentation**: Analyze runs and iterate on prompts and pipelines with measurable feedback loops

This guide documents **OTLP over HTTP** from the TrueFoundry AI Gateway ([Integration Steps](#integration-steps)). Laminar also supports **OTLP/gRPC** (often preferred for performance); for gRPC endpoints, ports (for example `8443` on Laminar Cloud), metadata, and SDK examples, see Laminar’s [OpenTelemetry tracing documentation](https://docs.lmnr.ai/tracing/otel).

<Note>
  If you use a gRPC exporter or need help diagnosing OTLP connection or auth issues with Laminar, read the **gRPC** and **Getting started** sections on that page, and use Laminar’s dedicated guide for problems with OpenTelemetry ingestion: [Troubleshooting OpenTelemetry](https://docs.lmnr.ai/tracing/troubleshooting-opentelemetry).
</Note>

## Prerequisites

Before integrating Laminar with TrueFoundry, ensure you have:

1. **TrueFoundry Account**: Create a [Truefoundry account](https://www.truefoundry.com/register) and follow the instructions in our [Gateway Quick Start Guide](https://docs.truefoundry.com/gateway/quick-start)
2. **Laminar Account**: Sign up at [lmnr.ai](https://www.lmnr.ai/)
3. **Laminar project API key**: Create or copy an API key for the project where traces should appear (your Laminar workspace / project settings)

<Frame>
  <img src="https://mintcdn.com/truefoundry/oV4Gs2xiqZzXmojM/images/laminar-project-api-keys.png?fit=max&auto=format&n=oV4Gs2xiqZzXmojM&q=85&s=92d8435d98e6569af69e9be447f8847e" alt="Laminar settings showing Project API keys with table of keys and plus API Key button for creating trace ingestion credentials" width="1024" height="516" data-path="images/laminar-project-api-keys.png" />
</Frame>

## Integration Steps

TrueFoundry AI Gateway can export OpenTelemetry traces to Laminar over HTTP so you can analyze gateway traffic alongside the rest of your stack.

<Steps>
  <Step title="Get your Laminar project API key">
    1. Log into the [Laminar app](https://www.lmnr.ai/).
    2. Open your project and go to the API key or project settings area (wording may vary by UI version).
    3. Create or copy a **project API key** used for trace ingestion. Store it securely — treat it like a secret.

    <Tip>
      If you are unsure where the key lives, check [Laminar’s documentation](https://docs.lmnr.ai/) for the latest steps to create a project API key.
    </Tip>
  </Step>

  <Step title="Configure OTEL export in TrueFoundry">
    1. In the TrueFoundry dashboard, go to **AI Engineering** → **Settings** → **OTEL Config** (under **Organisation**, in the AI Gateway section).

    <Frame>
      <img src="https://mintcdn.com/truefoundry/oV4Gs2xiqZzXmojM/images/laminar-truefoundry-settings-otel-config.png?fit=max&auto=format&n=oV4Gs2xiqZzXmojM&q=85&s=adee53c4e394d1bc0df8ae85d1d25bd5" alt="TrueFoundry AI Engineering and Settings navigation to Organisation OTEL Config showing traces endpoint and authorization header" width="1024" height="495" data-path="images/laminar-truefoundry-settings-otel-config.png" />
    </Frame>

    2. Click **edit** on the **OTEL Config** section to open the exporter form (if it is not already open).
    3. Enable the **OTEL Traces Exporter Configuration** toggle.
    4. Select **HTTP Configuration**.
    5. Enter the Laminar traces endpoint: `https://api.lmnr.ai/v1/traces`
    6. Set **Encoding** to `Proto`.

    <Frame>
      <img src="https://mintcdn.com/truefoundry/2k3td5m0XnsQ8bTs/images/Laminar.png?fit=max&auto=format&n=2k3td5m0XnsQ8bTs&q=85&s=b5a24cdcb2e0ff0fdf6d27efc760143d" alt="TrueFoundry OTEL Traces Exporter Configuration with HTTP endpoint https://api.lmnr.ai/v1/traces, Proto encoding, and Authorization Bearer header for Laminar" width="947" height="769" data-path="images/Laminar.png" />
    </Frame>
  </Step>

  <Step title="Configure headers">
    Laminar expects a single authentication header. No additional custom headers are required for basic ingestion.

    | Header          | Value                                   |
    | --------------- | --------------------------------------- |
    | `Authorization` | `Bearer <YOUR_LAMINAR_PROJECT_API_KEY>` |

    Replace `<YOUR_LAMINAR_PROJECT_API_KEY>` with the key from the first step. Click **Save** to apply your configuration.
  </Step>

  <Step title="Verify the integration">
    1. Send a few requests through the TrueFoundry AI Gateway.
    2. In TrueFoundry, open **Monitor** and confirm traces are being generated for those requests.
    3. In Laminar, open the project tied to that API key and confirm new traces appear with the expected spans and attributes.

    <Frame>
      <img src="https://mintcdn.com/truefoundry/oV4Gs2xiqZzXmojM/images/laminar-traces-dashboard.png?fit=max&auto=format&n=oV4Gs2xiqZzXmojM&q=85&s=919365cd937d8cd84d445bec7c5ab0b8" alt="Laminar traces view showing recent gateway spans in the table and activity over time" width="1024" height="532" data-path="images/laminar-traces-dashboard.png" />
    </Frame>
  </Step>
</Steps>

## Configuration summary

| Configuration       | Value                                            |
| ------------------- | ------------------------------------------------ |
| **Traces endpoint** | `https://api.lmnr.ai/v1/traces`                  |
| **Protocol**        | HTTP                                             |
| **Encoding**        | `Proto` (recommended for OTLP/HTTP with Laminar) |
| **Authentication**  | `Authorization: Bearer <project API key>`        |

<Note>
  The table above matches **HTTP** OTLP fields in TrueFoundry. For gRPC endpoints and SDK-specific setup, use [Laminar’s OTLP documentation](https://docs.lmnr.ai/tracing/otel); for ingestion issues, see [Troubleshooting OpenTelemetry](https://docs.lmnr.ai/tracing/troubleshooting-opentelemetry).
</Note>
