Sitelet https://maple.dev/docs/agent-tracing/
Skip to content
Maple Docs
Open app
Browse the docs
On this page

Trace your AI agent

Setup guides for sending each supported agent framework and LLM gateway to Maple as one Agent Session per conversation.

Each guide sets up one framework so every conversation shows up in Maple as one Agent Session. You turn on the framework’s own OpenTelemetry instrumentation and point it at Maple; there is no Maple SDK.

Quick setup with a coding agent

Copy this prompt into a coding agent that can run shell commands, such as Claude Code, Codex or Cursor. It installs the maple-agent-tracing skill, which detects your framework and installs the matching skill.

Set up Maple agent tracing in this project.

Install the skill with `npx skills add MapleTechLabs/maple/skills --skill maple-agent-tracing -y`, then follow it.

My Maple ingest key is maple_pk_... and my organization is in the US region.

Your ingest key is in Settings → Ingestion. If your organization is in the EU region, change US to EU in the prompt.

Choose your framework

TypeScript & JavaScript

Python

Java

C# / .NET

Other languages and frameworks

If you use a gateway like OpenRouter or LiteLLM together with a framework, instrument only the framework, or every model call is recorded twice. The OpenRouter guide covers the one exception.

Connection details

Every guide exports OTLP over HTTP with an ingest key from Settings → Ingestion:

export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.maple.dev"   # https://ingest.eu.maple.dev for EU organizations
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer YOUR_INGEST_KEY"
export OTEL_SERVICE_NAME="support-agent"

Maple doesn’t accept gRPC, so set the protocol to http/protobuf if your exporter defaults to it. A traces endpoint passed in code or through OTEL_EXPORTER_OTLP_TRACES_ENDPOINT must end in /v1/traces.

Keep agent traffic at 100% sampling, or sampled-out turns leave gaps in the session. See Sampling and throughput.

Not listed?

Anything that emits the OpenTelemetry GenAI conventions works; Any language lists what Maple reads. OpenInference and OpenLLMetry instrumentations also work, shown as Unidentified. Tell us what you run at support@maple.dev or on Discord and we’ll add a guide.