# Sentry

Sentry is supported in the SRE-agent flow and can be used to surface production issues and open fix PRs in the mapped repositories.

#### Simple setup flow

1. Open the Sentry integration settings in Baz.
2. Enter your Sentry auth token.
3. Enter the Sentry base URL.
4. Enter the Sentry org slug.
5. Add the relevant Sentry project slugs.
6. Save the integration.
7. Make sure the relevant repositories are connected to Baz with write access.
8. Make sure sandbox is enabled for the repositories where Baz should open SRE PRs.
9. Enable the SRE agent for the org.
10. Add service-to-repository or project-to-repository mapping where needed so Baz can connect Sentry issues to the right codebase.

#### What Baz checks during setup

Baz validates that:

* the credentials are valid
* the Sentry workspace is reachable
* the base URL is valid

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

#### Multi-project support

Sentry supports multiple projects per integration.

This is important for organizations that use a separate Sentry project for each service. In those cases, Baz should be configured with all relevant project slugs so the SRE agent can work across the full service set.

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

A connected Sentry 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 or project-to-repository mapping when Baz cannot resolve the target repository automatically

#### Common reasons it does not work

* The Sentry credentials are invalid.
* The base URL or org details are incorrect.
* The required projects were not added.
* 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 Sentry issue to the correct repository.


---

# 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.baz.co/basics/integrations/sentry.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.
