Skip to content

Commit

Permalink
Merge pull request #1653 from appwrite/fix-sentry-integrations
Browse files Browse the repository at this point in the history
Fix: Sentry integrations, DSN format
  • Loading branch information
ItzNotABug authored Jan 20, 2025
2 parents 0d809a4 + e4a151e commit 1c15560
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ docker compose exec appwrite vars
| `_APP_SYSTEM_SECURITY_EMAIL_ADDRESS` | This is the email address used to issue SSL certificates for custom domains or the user agent in your webhooks payload. |
| `_APP_USAGE_STATS` | This variable allows you to disable the collection and displaying of usage stats. This value is set to 'enabled' by default, to disable the usage stats set the value to 'disabled'. When disabled, it's recommended to turn off the Worker Usage container to reduce resource usage. |
| `_APP_LOGGING_PROVIDER` | **(version >= 0.12.0)** This variable allows you to enable logging errors to 3rd party providers. This value is empty by default, set the value to one of 'sentry', 'raygun', 'appSignal', 'logOwl' to enable the logger. |
| `_APP_LOGGING_CONFIG` | **(version >= 0.12.0)** This variable configures authentication to 3rd party error logging providers. If using Sentry, this should be 'SENTRY_API_KEY;SENTRY_APP_ID'. If using Raygun, this should be Raygun API key. If using AppSignal, this should be AppSignal API key. If using LogOwl, this should be LogOwl Service Ticket. |
| `_APP_LOGGING_CONFIG` | **(version >= 0.12.0)** This variable configures authentication to 3rd party error logging providers. If using Sentry, this should be 'SENTRY_PROJECT_ID;SENTRY_PUBLIC_KEY@SENTRY_HOST'. If using Raygun, this should be Raygun API key. If using AppSignal, this should be AppSignal API key. If using LogOwl, this should be LogOwl Service Ticket. |
| `_APP_USAGE_AGGREGATION_INTERVAL` | **(version >= 1.1.0)** Interval value containing the number of seconds that the Appwrite usage process should wait before aggregating stats and syncing it to Database from TimeSeries data. The default value is 30 seconds. Reintroduced in 1.1.0. |
| `_APP_USAGE_TIMESERIES_INTERVAL` | **(version >= 1.0.0)** Deprecated since 1.1.0 use _APP_USAGE_AGGREGATION_INTERVAL instead. |
| `_APP_USAGE_DATABASE_INTERVAL` | **(version >= 1.0.0)** Deprecated since 1.1.0 use _APP_USAGE_AGGREGATION_INTERVAL instead. |
Expand Down
6 changes: 3 additions & 3 deletions src/routes/integrations/logging-sentry/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ Head to **Settings** > **Projects** > Select your Sentry project > **Client Keys

For this step, you must [self-host Appwrite](https://appwrite.io/docs/advanced/self-hosting) if you haven’t already.

To add the Sentry provider, you need to slightly reconfigure your DSN. Your Sentry DSN is made up of 3 parts: **public key**, **URI**, and **project ID**. The Appwrite logging configuration expects a string in the format `SENTRY_PUBLIC_KEY;SENTRY_PROJECT_ID`. For example, if your Sentry DSN is `https://[email protected]/1`, then the Appwrite logging configuration will be `public;1`.
To add the Sentry provider, you need to slightly reconfigure your DSN. Your Sentry DSN is made up of 3 parts: **project ID**, **public key**, and **host**. The Appwrite logging configuration expects a string in the format `SENTRY_PROJECT_ID;SENTRY_PUBLIC_KEY@SENTRY_HOST`. For example, if your Sentry DSN is `https://[email protected]/1`, then the Appwrite logging configuration will be `1;[email protected]`.

Visit the `.env` file created for your Appwrite instance and update the following environment variables:

```bash
_APP_LOGGING_PROVIDER=sentry
_APP_LOGGING_CONFIG=SENTRY_PUBLIC_KEY;SENTRY_PROJECT_ID
_APP_LOGGING_CONFIG=SENTRY_PROJECT_ID;SENTRY_PUBLIC_KEY@SENTRY_HOST
```

After that, run the following Docker Compose commands in your terminal to restart your Appwrite containers and verify if the changes have been successfully applied:
Expand All @@ -64,7 +64,7 @@ docker compose exec appwrite vars
Once the Sentry provider is configured, run the following command in your terminal:

```bash
docker compose exec appwrite ssl --domain="wrongdomain.com"
docker compose exec appwrite ssl --domain="your-domain.com"
```

Doing so will show errors in your Sentry **Issues** page.
Expand Down

0 comments on commit 1c15560

Please sign in to comment.