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

# DataDog

> Export OpenLIT AI observability data to Datadog for unified LLM and infrastructure monitoring in one dashboard

![](https://datadog-docs.imgix.net/images/getting_started/opentelemetry/otel_demo/trace_waterfall.e1b3a6d28322156488acc866ed381508.png?auto=format)

To send OpenTelemetry metrics and traces generated by OpenLIT from your AI Application to DataDog via the DataDog Agent, follow the below steps.

### 1. DataDog Agent Setup

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
graph LR
    A[AI Application<br/>Instrumented by OpenLIT] --> B[DataDog Agent<br/>localhost:4318]
    B --> C[DataDog Backend<br/>APM & Logs]
```

> [!NOTE]
>
> **Prerequisites**: This guide assumes you have a DataDog Agent already installed and configured with OpenTelemetry support.
> If you need to install the DataDog Agent, please refer to the [DataDog Agent Installation Guide](https://docs.datadoghq.com/agent/).

### 2. Instrument your application

> [tab] SDK
>
> **For direct integration into your Python applications:**
>
> > [tab] Function Arguments
> >
> > ```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > import openlit
> >
> > openlit.init(
> >   otlp_endpoint="http://localhost:4318"
> > )
> > ```
> >
> > > [!NOTE]
> > >
> > > The DataDog Agent handles authentication and forwarding to DataDog. No API key needed in the application configuration.
>
> > [tab] Environment Variables
> >
> > ```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > import openlit
> >
> > openlit.init()
> > ```
> >
> > Set these environment variables:
> >
> > ```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
> > ```
> >
> > > [!NOTE]
> > >
> > > The DataDog Agent handles authentication and forwarding to DataDog. No API key needed in the application configuration.
>
> Refer to the OpenLIT [Python SDK repository](https://github.com/openlit/openlit/tree/main/sdk/python) for more advanced configurations and use cases.

> [tab] CLI
>
> **For zero-code auto-instrumentation via command line:**
>
> > [tab] CLI Arguments
> >
> > ```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > # Using CLI arguments
> > openlit-instrument \
> >   --otlp-endpoint "http://localhost:4318" \
> >   --service-name "my-ai-service" \
> >   --deployment-environment "production" \
> >   python app.py
> > ```
> >
> > > [!NOTE]
> > >
> > > The DataDog Agent handles authentication and forwarding to DataDog. No API key needed in the CLI configuration.
>
> > [tab] Environment Variables
> >
> > ```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > # Set environment variables (takes precedence over CLI args)
> > export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
> > export OTEL_SERVICE_NAME="my-ai-service"
> > export OTEL_DEPLOYMENT_ENVIRONMENT="production"
> >
> > # Run your application
> > openlit-instrument python app.py
> > ```
> >
> > > [!NOTE]
> > >
> > > The DataDog Agent handles authentication and forwarding to DataDog. No API key needed in the CLI configuration.
>
> Refer to the OpenLIT [Python SDK repository](https://github.com/openlit/openlit/tree/main/sdk/python) for more advanced configurations and use cases.

### 3. Exploring Telemetry in DataDog

Once your AI application is sending telemetry data to DataDog, you can explore and analyze it using DataDog's powerful observability features:

#### Software Catalog

View all your AI services and their connections:

* Go to **APM** → **Software Catalog**
* Select **Map** to see how services are connected
* Change **Map layout** to **Cluster** or **Flow** for different views
* Select **Catalog** view, then click a service for performance summary

#### Trace Explorer

Explore traces from your AI applications:

* Navigate to **Performance** → **Setup Guidance** → **View Traces**
* Select an indexed span to view full trace details
* View correlated data across tabs:
  * Infrastructure metrics for services with Host Metrics
  * Runtime metrics for implemented services
  * Log entries correlated with traces
  * Span links connected to traces

> [!NOTE]
>
> After your OpenLIT-instrumented AI application starts sending data, it may take a few minutes for traces and metrics to appear in DataDog. The built-in telemetry generation will begin automatically once your application processes AI requests.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.