---
title: Quickstart
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > LLM Observability > Quickstart
---

# Quickstart

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ().
{% /alert %}

{% /callout %}

This page demonstrates using Datadog's LLM Observability SDK to instrument a Python, Node.js, or Java LLM application.

### Prerequisites{% #prerequisites %}

LLM Observability requires a Datadog API key if you don't have a Datadog Agent running. Find your API key [in Datadog](https://app.datadoghq.com/organization-settings/api-keys).

### Setup{% #setup %}

Follow the setup instructions in Datadog's [in-app onboarding flow](https://app.datadoghq.com/llm/applications?setupMethod=manual&showOnboarding=true) for an interactive quickstart experience.

{% tab title="Python" %}

1. Install the SDK:

   ```shell
   pip install ddtrace
   ```

1. Prefix your Python start command with `ddtrace-run`:

   ```shell
   DD_LLMOBS_ENABLED=1 \
   DD_LLMOBS_ML_APP=quickstart-app \
   DD_SITE=<YOUR_DD_SITE> \
   DD_API_KEY=<YOUR_DATADOG_API_KEY> \
   ddtrace-run <your application command>
   ```

{% /tab %}

{% tab title="Node.js" %}

1. Install the SDK:

   ```shell
   npm install dd-trace
   ```

1. Add `NODE_OPTIONS` to your Node.js start command:

   ```shell
   DD_LLMOBS_ENABLED=1 \
   DD_LLMOBS_ML_APP=quickstart-app \
   DD_SITE=<YOUR_DD_SITE> \
   DD_API_KEY=<YOUR_DATADOG_API_KEY> \
   NODE_OPTIONS="--import dd-trace/initialize.mjs" <your application command>
   ```

{% /tab %}

{% tab title="Java" %}

1. Install the SDK:

   ```shell
   wget -O dd-java-agent.jar 'https://dtdg.co/latest-java-tracer'
   ```

1. Add the `-javaagent` JVM argument to your Java start command:

   ```shell
   java -javaagent:/path/to/dd-java-agent.jar \
   -Ddd.llmobs.enabled=true \
   -Ddd.llmobs.ml.app=quickstart-app \
   -Ddd.site=<YOUR_DD_SITE> \
   -Ddd.api.key=<YOUR_DATADOG_API_KEY> \
   -jar path/to/your/app.jar
   ```

{% /tab %}

Your Datadog site is . Replace `<YOUR_DATADOG_API_KEY>` with your Datadog API key.

### View traces{% #view-traces %}

Make requests to your application triggering LLM calls and then view traces in the **Traces** tab [of the **LLM Observability** page](https://app.datadoghq.com/llm/traces) in Datadog. If you don't see any traces, make sure you are using a supported library. Otherwise, you may need to instrument your application's LLM calls manually.

### Next steps{% #next-steps %}

After traces are being submitted from your application, you can:

- [Configure evaluations](https://docs.datadoghq.com/llm_observability/evaluations.md) that you can use to assess the effectiveness of your LLM application.
- Add [custom instrumentation](https://docs.datadoghq.com/llm_observability/instrumentation/custom_instrumentation.md) to your application and extract data that automatic instrumentation cannot.

## Example "Hello World" application{% #example-hello-world-application %}

See below for a simple application that can be used to begin exploring the LLM Observability product.

{% tab title="Python" %}

1. Install OpenAI with `pip install openai`.

1. Save example script `app.py`:

   ```python
   import os
   from openai import OpenAI
   
   oai_client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
   completion = oai_client.chat.completions.create(
       model="gpt-4o-mini",
       messages=[
        {"role": "system", "content": "You are a helpful customer assistant for a furniture store."},
        {"role": "user", "content": "I'd like to buy a chair for my living room."},
    ],
   )
   ```

1. Run the application:

   ```shell
   DD_LLMOBS_ENABLED=1 \
   DD_LLMOBS_ML_APP=quickstart-app \
   DD_API_KEY=<YOUR_DATADOG_API_KEY> \
   ddtrace-run app.py
   ```

{% /tab %}

{% tab title="Node.js" %}

1. Install OpenAI with `npm install openai`.

1. Save example script `app.js`:

   ```js
   const { OpenAI } = require('openai');
   const oaiClient = new OpenAI(process.env.OPENAI_API_KEY);
   
   async function main () {
       const completion = await oaiClient.chat.completions.create({
          model: 'gpt-4o-mini',
          messages: [
             { role: 'system', content: 'You are a helpful customer assistant for a furniture store.' },
             { role: 'user', content: 'I\'d like to buy a chair for my living room.' },
          ]
       });
       return completion;
   }
   
   main().then(console.log)
   ```

1. Run the application:

   ```
   DD_LLMOBS_ENABLED=1 \
   DD_LLMOBS_ML_APP=quickstart-app \
   DD_API_KEY=<YOUR_DATADOG_API_KEY> \
   NODE_OPTIONS="--import dd-trace/initialize.mjs" node app.js
   ```

{% /tab %}

## Further Reading{% #further-reading %}

- [Configure Evaluations on your application](https://docs.datadoghq.com/llm_observability/evaluations.md)
- [Instrument your application with custom spans](https://docs.datadoghq.com/llm_observability/instrumentation/custom_instrumentation.md)
