goose/documentation/docs/tutorials/laminar.md
Sam Komesarook 665ecbcdcb
Some checks failed
CI / changes (push) Waiting to run
CI / Check Rust Code Format (push) Blocked by required conditions
CI / Build and Test Rust Project (push) Blocked by required conditions
CI / Lint Rust Code (push) Blocked by required conditions
CI / Check OpenAPI Schema is Up-to-Date (push) Blocked by required conditions
CI / Test and Lint Electron Desktop App (push) Blocked by required conditions
Live Provider Tests / check-fork (push) Waiting to run
Live Provider Tests / changes (push) Blocked by required conditions
Live Provider Tests / Build Release Binary (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (Code Execution) (push) Blocked by required conditions
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Deploy Documentation / deploy (push) Has been cancelled
Add Laminar for Observability (#6514)
Signed-off-by: sam <sam@aecomposite.co>
2026-02-01 11:02:16 -05:00

57 lines
2.1 KiB
Markdown

---
description: Integrate goose with Laminar to observe performance
---
# Observability with Laminar
This tutorial covers how to integrate goose with Laminar to trace your goose sessions and understand how the agent is performing.
## What is Laminar
[Laminar](https://laminar.sh/) is an open-source observability platform purpose-built for AI agents. It traces LLM calls, tool execution, and custom functions so you can debug, evaluate, and improve agent behavior.
## Why Laminar for goose
- High-signal traces for LLM calls, tools, and sub-agents.
- Replay any span in the Playground to compare prompts and models.
- Build datasets from production traces and run evaluations.
- Analyze trace patterns with natural language queries and dashboards.
## Set up Laminar
Sign up for Laminar Cloud at [laminar.sh](https://laminar.sh) or self-host Laminar from the [open-source repo](https://github.com/lmnr-ai/lmnr). Grab your project API key.
## Configure goose to export OTLP to Laminar
goose exports OpenTelemetry data over OTLP/HTTP. Point the exporter to Laminar and provide your API key as an authorization header.
### Laminar Cloud
```bash
export LMNR_PROJECT_API_KEY=lmnr_proj_...
export OTEL_EXPORTER_OTLP_ENDPOINT="https://api.lmnr.ai"
export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer ${LMNR_PROJECT_API_KEY}"
export OTEL_EXPORTER_OTLP_TIMEOUT=10000
```
### Self-hosted Laminar
```bash
export LMNR_PROJECT_API_KEY=lmnr_proj_...
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:8000"
export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer ${LMNR_PROJECT_API_KEY}"
```
If your self-hosted instance does not require auth, you can omit `OTEL_EXPORTER_OTLP_HEADERS`.
:::tip
If you do not see traces, try setting the endpoint to the explicit OTLP path, such as `https://api.lmnr.ai/v1/traces` or `http://localhost:8000/v1/traces`.
:::
## Run goose with Laminar enabled
Start goose normally. With the OTLP environment variables set, Laminar will capture traces of your goose sessions and tool execution.
_[Example trace (public) in Laminar](https://laminar.sh/shared/traces/63010af0-cf31-b8b6-0d77-fc9924bcaa4c)_
![goose trace in Laminar](../assets/guides/laminar.png)