# How to connect Flowlines to production traces

> Connect OpenTelemetry, Langfuse, or LangSmith to Flowlines, verify the first session, and analyze behavior across production traces.

Source: https://flowlines.ai/blog/how-to-integrate-flowlines-in-5-minutes · Updated 2026-09-25 · By Flowlines
Index of all Flowlines pages for AI agents: https://flowlines.ai/llms.txt

*Last updated: September 2026*

Application-agent traces do not require a proprietary Flowlines SDK when they already contain the context needed for analysis. Flowlines supports standard OpenTelemetry ingest, read-only provider polling for Langfuse and LangSmith, provider-side OpenTelemetry export, and a one-time public LangSmith trace import. MCP server observability is separate: the server needs an OpenTelemetry-compatible integration described in the [MCP observability guide](https://flowlines.ai/blog/mcp-server-observability-guide).

For a guided application-agent connection, [book a setup meeting](https://flowlines.ai/request-access). To work with Flowlines from Claude Code or Codex, [connect your assistant](https://flowlines.ai/start), then choose the monitoring setup you need. Connecting the Flowlines MCP does not automatically enable coding-tool monitoring.

## 1. Create a namespace API key

Every trace is routed into a Flowlines namespace. Open Settings, choose the namespace, then create a key under API keys. The key is sent in the `x-flowlines-api-key` header.

## 2. Choose a connection path

- **OpenTelemetry push.** Send OTLP/JSON or protobuf traces directly to the Flowlines traces endpoint. Payloads may be gzipped.
- **Langfuse API polling.** Import traces from the Langfuse public API using a read-only connection.
- **Langfuse SDK push.** Langfuse v3 SDKs are OpenTelemetry based, so Flowlines can be added as a second exporter.
- **LangSmith API polling.** Import runs from one LangSmith project.
- **LangSmith OpenTelemetry export.** Mirror LangSmith runs to Flowlines while keeping LangSmith untouched.
- **LangSmith public share.** Import one public trace share for a focused investigation.

## 3. Configure OpenTelemetry

Set `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://api.flowlines.ai/v1/traces`. The compatible `/traces` path is also accepted.

Set `OTEL_EXPORTER_OTLP_HEADERS="x-flowlines-api-key=<your-api-key>"`.

Set `OTEL_EXPORTER_OTLP_PROTOCOL=http/json` when using the JSON transport. Flowlines accepts OTLP/JSON or protobuf and understands standard `gen_ai.*` attributes for model, token and prompt context.

## 4. Preserve user and session context

A valid trace proves that data arrived. Stable user and session identifiers make the behavioral analysis useful. Preserve the parent session for tool calls, plus tool name, server, duration, status and outcome context for MCP journeys.

## 5. Verify the first session

Run one representative journey, open Search in Flowlines, and confirm the expected session appears. Check its user, intent, agent, tool and time context before relying on aggregate views.

The Home view then shows analyzed chats, active users, issue-free rate, negative feedback, user cohorts, intents, issues and sessions that need attention.

## 6. Move from issue to evidence

When Flowlines finds a recurring issue, the investigation is organized into four answers:

- What happened
- Why it matters
- What to do next
- Which use cases, users and production sessions are affected

This is the difference between receiving another trace and gaining production visibility. The trace is the input. The behavioral answer is the product.

## Next steps

- [Read the complete documentation](https://flowlines.ai/docs)
- [Review every supported connection path](https://flowlines.ai/integrations)
- [See how MCP journeys are reconstructed](https://flowlines.ai/mcp-observability)
