diff --git a/.env.example b/.env.example
index 0d27464..ddde206 100644
--- a/.env.example
+++ b/.env.example
@@ -20,3 +20,7 @@ LOG_LEVEL=INFO
 # https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
 # Right click channel in Discord -> Intergrations -> Webhooks -> Create Webhook.
 WEBHOOK_URL=https://discord.com/api/webhooks/582696524044304394/a3CMwZWchmHAXItB_lzSSRYBx0-AlPAHseJWqhHLfsAg_X4erac9-CeVeUDqPI1ac1vT
+
+# Custom Sentry DSN for error tracking.
+# https://docs.sentry.io/concepts/key-terms/dsn-explainer/
+# SENTRY_DSN=
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 6690fa8..80e3eb4 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -5,6 +5,7 @@
         "asctime",
         "asyncio",
         "audioop",
+        "autouse",
         "botuser",
         "cookiejar",
         "dateparser",
diff --git a/discord_reminder_bot/main.py b/discord_reminder_bot/main.py
index c46fdb2..f2be605 100644
--- a/discord_reminder_bot/main.py
+++ b/discord_reminder_bot/main.py
@@ -3,6 +3,8 @@ from __future__ import annotations
 import asyncio
 import datetime
 import json
+import os
+import platform
 import tempfile
 from pathlib import Path
 from typing import TYPE_CHECKING, Any
@@ -29,8 +31,10 @@ if TYPE_CHECKING:
     from discord_reminder_bot import settings
 
 
+default_sentry_dsn: str = "https://c4c61a52838be9b5042144420fba5aaa@o4505228040339456.ingest.us.sentry.io/4508707268984832"
 sentry_sdk.init(
-    dsn="https://c4c61a52838be9b5042144420fba5aaa@o4505228040339456.ingest.us.sentry.io/4508707268984832",
+    dsn=os.getenv("SENTRY_DSN", default_sentry_dsn),
+    environment=platform.node() or "Unknown",
     traces_sample_rate=1.0,
     send_default_pii=True,
 )
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 0000000..ebb13aa
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,8 @@
+from __future__ import annotations
+
+import os
+
+
+def pytest_configure() -> None:
+    """Ignore Sentry when running tests."""
+    os.environ["SENTRY_DSN"] = ""