> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/logs/integrations/providers/sentry.md).

# Sentry

Connect Sentry to Logs — coming soon; the card is in Cloud, but Norbix refuses to save it yet.

Sentry groups errors into issues and links them to releases; logs and errors from your backend would show next to them.

{% hint style="warning" %}
Cloud has no working Sentry integration yet. The **Sentry** card is in the picker and its form opens, but the form has only **Integration Name**, and **Save** is refused: *The 'Sentry' logging provider isn't available yet. Support for it is coming soon — for now you can use Norbix Logging or Datadog for project logging.* The same answer comes from the SDK, the CLI and the API. To keep your logs today, use [Norbix Logging](/codemash/cloud/logs/integrations/providers/norbix-logging.md).
{% endhint %}

## Get your credentials

What Sentry will ask for, from its own documentation:

1. Sign in to Sentry and open your project → **Settings → Client Keys (DSN)**.
2. Copy the **DSN** (`https://<key>@<org>.ingest.sentry.io/<project>`). See [Data Source Name (DSN)](https://docs.sentry.io/concepts/key-terms/dsn-explainer/).
3. For the backend setup Sentry recommends, see [Integrate your backend](https://docs.sentry.io/product/sentry-basics/integrate-backend/).

## Connect it in Cloud

**Where:** Logs → Integrations → **Add New Integration** → Sentry · `/projects/<project>/logging/integrations/new/sentry`

| Field            | Required | What it does                                                                   | Example         |
| ---------------- | -------- | ------------------------------------------------------------------------------ | --------------- |
| Integration Name | yes      | The name in your integrations list. The Sentry fields are not in the form yet. | `Sentry errors` |

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-b82650a7524aec6705d6f0d6f280d92c4b922131%2Fsentry-form-1.png?alt=media" alt="New Sentry Integration form with only the field Integration Name, filled with Sentry errors"><figcaption><p>The form has only the name.</p></figcaption></figure>

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-fd75366b0343e0d4dbaf8ec70731024218122867%2Fsentry-saved-2.png?alt=media" alt="After Save: the toast Bad request and the red text The &#x27;Sentry&#x27; logging provider isn&#x27;t available yet."><figcaption><p>Save is refused.</p></figcaption></figure>

## Test and set as default

There is nothing to test until Sentry can be saved. When it can, **Test integration** works as described in [Test an integration](/codemash/cloud/logs/integrations/test.md); logging has no default integration ([Default integration](/codemash/cloud/logs/integrations/set-default.md)).

## Common errors

| Message                                                                                                                                               | Cause                       | Fix                                                                                  |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------ |
| The 'Sentry' logging provider isn't available yet. Support for it is coming soon — for now you can use Norbix Logging or Datadog for project logging. | Every save of Sentry today. | Use [Norbix Logging](/codemash/cloud/logs/integrations/providers/norbix-logging.md). |

## Do it from code

```ts
const { id } = await norbix.hub.logs.saveLoggingIntegration({
  projectId,
  integration: {
    provider: 'Sentry',
    integrationName: 'Sentry errors',
    isEnabled: true,
  } as any, // the TS type knows only the shared fields
});
// throws: The 'Sentry' logging provider isn't available yet. …
```

```sh
norbix hub logs logging integration save --projectId "$NORBIX_PROJECT_ID" --integration '{"provider":"Sentry","integrationName":"Sentry errors","isEnabled":true}'
```

The provider is written `Sentry` in requests. The client setup is on the [Logs page](/codemash/cloud/logs.md#use-it-from-code). API: [Save Logging Integration](/codemash/api-reference/logs/integrations/save-logging-integration.md)
