Back to Crewai

OpenTelemetry Export

docs/en/enterprise/guides/capture_telemetry_logs.mdx

1.14.73.0 KB
Original Source

CrewAI AMP can export OpenTelemetry traces and logs from your deployments directly to your own collector. This lets you monitor agent performance, track LLM calls, and debug issues using your existing observability stack.

Telemetry data follows the OpenTelemetry GenAI semantic conventions plus additional CrewAI-specific attributes.

Prerequisites

<CardGroup cols={2}> <Card title="CrewAI AMP account" icon="users"> Your organization must have an active CrewAI AMP account. </Card> <Card title="OpenTelemetry collector" icon="server"> You need an OpenTelemetry-compatible collector endpoint (e.g., your own OTel Collector, Datadog, Grafana, or any OTLP-compatible backend). </Card> </CardGroup>

Setting up a collector

  1. In CrewAI AMP, go to Settings > OpenTelemetry Collectors.
  2. Click Add Collector.
  3. Select an integration:
    • OpenTelemetry Traces and OpenTelemetry Logs — export to any OTLP-compatible collector or backend.
    • Datadog — send traces straight to Datadog's OTLP intake, no separate collector or Datadog Agent required.
  4. Configure the connection. The fields depend on the integration you selected:
<Tabs> <Tab title="OpenTelemetry Traces / Logs"> **OpenTelemetry Traces** and **OpenTelemetry Logs** are separate integrations that share the same fields — pick the one matching the signal you want to export.
- **Endpoint** — Your collector's OTLP endpoint (e.g., `https://otel-collector.example.com:4317`).
- **Service Name** — A name to identify this service in your observability platform.
- **Custom Headers** *(optional)* — Add authentication or routing headers as key-value pairs.
- **Certificate** *(optional)* — Provide a TLS certificate if your collector requires one.

<Frame>![OpenTelemetry collector configuration](/images/crewai-otel-collector-opentelemetry.png)</Frame>
</Tab> <Tab title="Datadog"> - **Datadog Site Domain** — Your Datadog site's OTLP host only, with no protocol or path. CrewAI builds the full HTTPS OTLP endpoint for you. Use the host that matches your [Datadog site](https://docs.datadoghq.com/getting_started/site/): - `otlp.datadoghq.com` (US1) - `otlp.us3.datadoghq.com` (US3) - `otlp.us5.datadoghq.com` (US5) - `otlp.datadoghq.eu` (EU1) - `otlp.ap1.datadoghq.com` (AP1) - **API Key** — Your Datadog API key. See [how to create one](https://docs.datadoghq.com/account_management/api-app-keys/#api-keys).
The Datadog integration exports **traces**.

<Frame>![Datadog collector configuration](/images/crewai-otel-collector-datadog.png)</Frame>
</Tab> </Tabs>
  1. (optional) Click Test Connection to verify CrewAI can reach the endpoint with the credentials you provided.
  2. Click Save.
<Tip> You can add multiple collectors — for example, one for traces and another for logs, or send to different backends for different purposes. </Tip>