Skip to content

Commit 813c3b5

Browse files
authored
Merge pull request #1832 from appwrite/update-logging-doc
Update logging doc to match Appwrite migration to DSN syntax
2 parents 6d086ea + 172264d commit 813c3b5

File tree

5 files changed

+51
-23
lines changed

5 files changed

+51
-23
lines changed

src/routes/docs/advanced/self-hosting/environment-variables/+page.markdoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ docker compose exec appwrite vars
3838
| `_APP_SYSTEM_RESPONSE_FORMAT` | Use this environment variable to set the default Appwrite HTTP response format to support an older version of Appwrite. This option is useful to overcome breaking changes between versions. You can also use the `X-Appwrite-Response-Format` HTTP request header to overwrite the response for a specific request. This variable accepts any valid Appwrite version. To use the current version format, leave the value of the variable empty. |
3939
| `_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. |
4040
| `_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. |
41-
| `_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. |
42-
| `_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. |
41+
| `_APP_LOGGING_PROVIDER` | Deprecated since 1.6.0, use `_APP_LOGGING_CONFIG` with DSN value instead. 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. |
42+
| `_APP_LOGGING_CONFIG` | This variable allows you to enable logging errors to third party providers. This value is empty by default, set a DSN value to one of the following `sentry://PROJECT_ID:SENTRY_API_KEY@SENTRY_HOST/`, , `logowl://SERVICE_TICKET@SERIVCE_HOST/` `raygun://RAYGUN_API_KEY/`, `appSignal://API_KEY/` to enable the logger. For versions prior `1.5.6` you can use the old syntax. Old syntax: 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. |
4343
| `_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. |
4444
| `_APP_USAGE_TIMESERIES_INTERVAL` | **(version >= 1.0.0)** Deprecated since 1.1.0 use _APP_USAGE_AGGREGATION_INTERVAL instead. |
4545
| `_APP_USAGE_DATABASE_INTERVAL` | **(version >= 1.0.0)** Deprecated since 1.1.0 use _APP_USAGE_AGGREGATION_INTERVAL instead. |

src/routes/docs/advanced/self-hosting/production/+page.markdoc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You **must** set `_APP_OPENSSL_KEY_V1` immediately after installation of a produ
1515
Make sure to keep this key in a safe place and never make it publicly accessible.
1616

1717
{% info title="Best practice" %}
18-
You should always prefer **HTTPS** over HTTP in production environments. This keeps your APIs secure and prevents any redirects from interfering with your requests.
18+
You should always prefer **HTTPS** over HTTP in production environments. This keeps your APIs secure and prevents any redirects from interfering with your requests.
1919
You can force the use of HTTPS with the [_APP_OPTIONS_FORCE_HTTPS](/docs/advanced/self-hosting/environment-variables) environment variable.
2020
{% /info %}
2121

@@ -30,7 +30,7 @@ Appwrite provides three different methods to limit access to your Appwrite Conso
3030
By default, only the first user can sign up on the Appwrite instance's dashboard. All other users must be added to the dashboard through invitation.
3131

3232
{% arrow_link href="/docs/advanced/self-hosting/environment-variables" %}
33-
Learn more about environment variables
33+
Learn more about environment variables
3434
{% /arrow_link %}
3535

3636
# Scaling {% #scaling %}
@@ -50,7 +50,7 @@ If you disabled rate limits during development, make sure you re-enable them whe
5050
Rate limits are an important mechanism to protect your app. Without rate limits, malicious actors can spam your APIs to perform [denial-of-service type attacks](https://en.wikipedia.org/wiki/Denial-of-service_attack) or brute-force user passwords.
5151

5252
{% arrow_link href="/docs/advanced/self-hosting/environment-variables" %}
53-
Learn more about environment variables
53+
Learn more about environment variables
5454
{% /arrow_link %}
5555

5656
# Emails {% #emails %}
@@ -75,14 +75,17 @@ Do not back up any stateful container using a docker volume backup, such as data
7575

7676
By default, your Appwrite installation comes with error reporting turned off. You can [enable dev mode](/docs/advanced/self-hosting/debug#development-mode) to get access to more verbose error logs and stack traces.
7777

78-
In production, it is highly recommended to turn error reporting off. To do so, make sure the Appwrite container environment variable `_APP_ENV` value from is set to `production` and not `development`.
78+
In production, it is highly recommended to turn error reporting off. To do so, make sure the Appwrite container environment variable `_APP_ENV` is set to `production` and not `development`.
7979

80-
To monitor errors in production, add a third party monitoring service by setting the `_APP_LOGGING_PROVIDER` and `_APP_LOGGING_CONFIG`.
80+
To monitor errors in production, configure the `_APP_LOGGING_CONFIG` environment variable with your provider's DSN. The supported DSN formats are:
8181

82-
In production, it is highly recommended to turn error reporting off. To do so, make sure the Appwrite container environment variable `_APP_ENV` is set to `production` and not `development`.
82+
- Sentry: `sentry://PUBLIC_KEY@HOST:PORT/PROJECT_ID`
83+
- LogOwl: `logowl://SERVICE_TICKET@SERVICE_HOST/`
84+
- Raygun: `raygun://RAYGUN_API_KEY/`
85+
- AppSignal: `appsignal://API_KEY/`
8386

8487
{% arrow_link href="/docs/advanced/self-hosting/environment-variables" %}
85-
Learn more about environment variables
88+
Learn more about environment variables
8689
{% /arrow_link %}
8790

8891
# Security {% #security %}

src/routes/integrations/logging-appsignal/+page.markdoc

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ isPartner: true
88
isNew: true
99
cover: /images/integrations/logging-appsignal/cover.png
1010
category: logging
11-
product:
11+
product:
1212
avatar: '/images/integrations/avatars/appsignal.png'
1313
vendor: AppSignal
1414
description: 'AppSignal is a comprehensive monitoring and error-tracking tool designed for developers to gain insights into the performance of their applications.'
15-
platform:
15+
platform:
1616
- 'Self-hosted'
17-
images:
17+
images:
1818
- /images/integrations/logging-appsignal/cover.png
1919
- /images/integrations/logging-appsignal/api-key.png
2020
- /images/integrations/logging-appsignal/errors-list.png
@@ -39,14 +39,23 @@ First, [sign up on AppSignal](https://appsignal.com/users/sign_up) and create yo
3939

4040
## Step 2: Add AppSignal provider to your Appwrite instance
4141

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

44-
Visit the `.env` file created for your Appwrite instance and update the following environment variables:
44+
The Appwrite logging configuration uses a DSN format that follows the pattern `appsignal://API_KEY/`. Use your AppSignal Push API key as the API_KEY in the DSN.
4545

46+
Visit the `.env` file created for your Appwrite instance and update the following environment variable:
47+
48+
```bash
49+
_APP_LOGGING_CONFIG=appsignal://API_KEY/
50+
```
51+
52+
{% info title="Using Appwrite < 1.5.6?" %}
53+
For versions prior to 1.5.6, use the old syntax format:
4654
```bash
4755
_APP_LOGGING_PROVIDER=appSignal
4856
_APP_LOGGING_CONFIG=APPSIGNAL_API_KEY
4957
```
58+
{% /info %}
5059

5160
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:
5261

src/routes/integrations/logging-raygun/+page.markdoc

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,29 @@ To implement the Raygun provider for logging, there are several steps you must c
3333

3434
## Step 1: Sign up for Raygun
3535

36-
First, [sign up on Raygun](https://app.raygun.com/signup?product=cr) (pick **Crash Reporting** as the product youre most interested in) and create your first application. Head to **Application settings** from the left-side navbar and copy your **API Key**.
36+
First, [sign up on Raygun](https://app.raygun.com/signup?product=cr) (pick **Crash Reporting** as the product you're most interested in) and create your first application. Head to **Application settings** from the left-side navbar and copy your **API Key**.
3737

3838
![API key](/images/integrations/logging-raygun/api-key.png)
3939

4040
## Step 2: Add Raygun provider to your Appwrite instance
4141

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

44-
Visit the `.env` file created for your Appwrite instance and update the following environment variables:
44+
The Appwrite logging configuration uses a DSN format that follows the pattern `raygun://API_KEY/`. Use your Raygun API key in the DSN.
4545

46+
Visit the `.env` file created for your Appwrite instance and update the following environment variable:
47+
48+
```bash
49+
_APP_LOGGING_CONFIG=raygun://API_KEY/
50+
```
51+
52+
{% info title="Using Appwrite < 1.5.6?" %}
53+
For versions prior to 1.5.6, use the old syntax format:
4654
```bash
4755
_APP_LOGGING_PROVIDER=raygun
4856
_APP_LOGGING_CONFIG=RAYGUN_API_KEY
4957
```
58+
{% /info %}
5059

5160
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:
5261

src/routes/integrations/logging-sentry/+page.markdoc

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ isPartner: true
88
isNew: true
99
cover: /images/integrations/logging-sentry/cover.png
1010
category: logging
11-
product:
11+
product:
1212
avatar: '/images/integrations/avatars/sentry.png'
1313
vendor: Sentry
1414
description: 'Sentry is an open-source error-tracking and performance-monitoring tool designed to help developers identify, diagnose, and fix issues in real-time.'
15-
platform:
15+
platform:
1616
- 'Self-hosted'
17-
images:
17+
images:
1818
- /images/integrations/logging-sentry/cover.png
1919
- /images/integrations/logging-sentry/project.png
2020
- /images/integrations/logging-sentry/issues.png
@@ -41,16 +41,23 @@ Head to **Settings** > **Projects** > Select your Sentry project > **Client Keys
4141

4242
## Step 2: Add Sentry provider to your Appwrite instance
4343

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

46-
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://public@sentry.example.com/1`, then the Appwrite logging configuration will be `1;public@sentry.example.com`.
46+
The Appwrite logging configuration uses a DSN format that follows the pattern `sentry://PROJECT_ID:SENTRY_API_KEY@SENTRY_HOST/`. For example, if your Sentry DSN is `https://abcdef@sentry.example.com/1`, then the Appwrite logging configuration will be `sentry://1:abcdef@sentry.example.com/`.
4747

48-
Visit the `.env` file created for your Appwrite instance and update the following environment variables:
48+
Visit the `.env` file created for your Appwrite instance and update the following environment variable:
4949

50+
```bash
51+
_APP_LOGGING_CONFIG=sentry://PROJECT_ID:SENTRY_API_KEY@SENTRY_HOST/
52+
```
53+
54+
{% info title="Using Appwrite < 1.5.6?" %}
55+
For versions prior to 1.5.6, use the old syntax format:
5056
```bash
5157
_APP_LOGGING_PROVIDER=sentry
5258
_APP_LOGGING_CONFIG=SENTRY_PROJECT_ID;SENTRY_PUBLIC_KEY@SENTRY_HOST
5359
```
60+
{% /info %}
5461

5562
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:
5663

0 commit comments

Comments
 (0)