# Sending Data to Digma Using the Datadog agent

### Set up Dual Shipping&#x20;

If you're using the Datadog Agent (dd-agent) and not an OTEL agent/collector, you can forward traces to Digma using Datadog's[ dual shipping](https://docs.datadoghq.com/agent/configuration/dual-shipping/?tab=helm) feature.

To use this feature,  modify the agent's configuration to include Digma's DataDog receiver:

```yaml
apm_config:
  additional_endpoints:
    "[REPLACE_WITH_DIGMAS_COLLECTOR_DATADOG_ENDPOINT]":
    - datadog_reciver
```

Alternatively, you can add the following env variable:

```
DD_APM_ADDITIONAL_ENDPOINTS={"[REPLACE_WITH_DIGMAS_COLLECTOR_DATADOG_ENDPOINT]": ["datadog_receiver"]}
```

### Add tags to specify the Digma environment

Digma will automatically copy data from the Datadog traces such as the git commit hash, if present. However, to ensure the data is classified correctly within Digma, you need to add two additional tags to your tracing data. This can be done using environment variables.&#x20;

```bash
export DD_TAGS=digma.environment:$ENV_NAME,digma.environment.type:Public
```

Additionally, to use custom instrumentation or Digma auto instrumentation, you can include the following environment variable that will configure the DD agent to respect the OTEL instrumentation attributes:

```bash
export DD_TRACE_OTEL_ENABLED=true
```

Alternatively,&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digma.ai/digma-developer-guide/instrumentation/sending-data-to-digma-using-the-datadog-agent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
