> For the complete documentation index, see [llms.txt](https://docs.baz.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.baz.co/basics/integrations/datadog.md).

# Datadog

When Datadog is connected, Baz validates the integration during setup and uses production issues from Datadog to identify recurring problems and open fix PRs in the mapped repositories.

#### Simple setup flow

1. Open the Datadog integration settings in Baz.
2. Enter your Datadog API key and Application key.
3. Select the correct Datadog base URL for your region.
4. Save the integration.
5. Make sure the relevant repositories are connected to Baz with write access.
6. Make sure sandbox is enabled for the repositories where Baz should open SRE PRs.
7. Enable the SRE agent for the org.
8. Add service-to-repository mapping where needed so Baz can connect production issues to the right codebase.

#### What Baz checks during setup

Baz validates that:

* the credentials are valid
* the Datadog workspace is reachable
* the integration has enough access for the SRE agent to work

If the setup is valid, Baz can use Datadog findings as input for the SRE flow.

#### What is required for SRE PRs to work

A connected Datadog integration is only one part of the flow.

Baz also needs:

* the target repositories connected in Baz
* GitHub write access for those repositories
* sandbox configured for those repositories
* SRE agent enabled for the org
* service-to-repository mapping when the service name does not resolve automatically

#### Common reasons it does not work

* The Datadog credentials are valid, but the integration does not have enough access.
* The repositories are not connected with write access.
* Sandbox is missing for the target repository.
* The SRE agent is disabled for the org.
* Baz cannot map the Datadog service to the correct repository.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.baz.co/basics/integrations/datadog.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
