# Export logs and traces to Datadog
source: https://docs.chalk.ai/docs/datadog-telemetry-export

## Configure the Vector aggregator to export logs, metrics, and traces to Datadog.

Use the Vector aggregator to send Chalk logs, metrics, and traces to your Datadog account.

This Vector aggregator export is available when your organization pays for Metrics Export and the
feature is enabled for your team. You also need an existing telemetry deployment and must select the
Vector runtime. If Exporters is missing from the dashboard, contact Chalk to check access to the
feature.

### Store your Datadog API key

Create a secret in AWS Secrets Manager whose value is only the raw Datadog API key string. Do not
wrap the value in JSON (such as {"api_key":"..."}) or add quotation marks around it. Use the AWS
account and region of the cloud cluster that runs your telemetry deployment, and allow that cluster's
cloud credentials to read the secret. Copy the secret's full ARN, for example:

```
arn:aws:secretsmanager:us-east-1:123456789012:secret:datadog-api-key-AbCdEf
```

Chalk reads the secret when it deploys the telemetry configuration and places the key in a Kubernetes
secret for the customer Vector aggregator.

### Configure export in the dashboard

- Open Settings → Shared resources → Telemetry for the environment. This tab is available when
the environment already has a telemetry deployment.
- Use the guided form and select Vector under Telemetry Runtime. Open Exporters → Export to
Datadog.
- Set API Key Lookup Type to ARN and paste the ARN into API Key Secret ARN. Set API Host
to your Datadog site, such as datadoghq.eu, if you do not use the default datadoghq.com site.
- Turn on Export Logs to Datadog, Export Metrics to Datadog, and Export Traces to Datadog
for the signals you want to send. Turn off a signal's switch to stop exporting that signal to
Datadog.
- Save the form and review the configuration changes in the confirmation dialog. Confirm to deploy
the update. You can change the switches, ARN, API host, and VRL in this form without editing the
telemetry JSON.

The Telemetry switch controls collection for the entire environment. Leave it enabled when you
want exports to continue.

### Remap events with VRL

Use Vector Remap Language (VRL) to change events before
export. Under Exporters → Shared VRL, the Logs Remap VRL, Metrics Remap VRL, and
Traces Remap VRL fields apply to every export destination for the corresponding signal. Under
Export to Datadog → VRL, the same three fields apply only to your Datadog export, after the shared
VRL for that signal.

For example, enter this in Export to Datadog → VRL → Metrics Remap VRL to add a tag to metrics
sent to your Datadog account:

```
.tags.customer = "acme"
```

Save and confirm the telemetry update after changing VRL. Leave a remap field empty when you do not
need to change that signal.





