add sentry support
This commit is contained in:
parent
7a6a8a432b
commit
2e52ecf293
3 changed files with 16 additions and 0 deletions
|
@ -83,6 +83,7 @@ env = environ.FileAwareEnv(
|
||||||
DISCORD_WEBHOOKS=(dict, {"user-report": None}),
|
DISCORD_WEBHOOKS=(dict, {"user-report": None}),
|
||||||
# Slack API token, for sending exceptions to Slack, may deprecate in future
|
# Slack API token, for sending exceptions to Slack, may deprecate in future
|
||||||
SLACK_API_TOKEN=(str, ""),
|
SLACK_API_TOKEN=(str, ""),
|
||||||
|
NEODB_SENTRY_DSN=(str, ""),
|
||||||
)
|
)
|
||||||
|
|
||||||
# ====== End of user configuration variables ======
|
# ====== End of user configuration variables ======
|
||||||
|
@ -508,3 +509,15 @@ CORS_ALLOW_METHODS = (
|
||||||
# "PUT",
|
# "PUT",
|
||||||
)
|
)
|
||||||
DEFAULT_RELAY_SERVER = "https://relay.neodb.net/actor"
|
DEFAULT_RELAY_SERVER = "https://relay.neodb.net/actor"
|
||||||
|
|
||||||
|
SENTRY_DSN = env("NEODB_SENTRY_DSN")
|
||||||
|
if SENTRY_DSN:
|
||||||
|
import sentry_sdk
|
||||||
|
from sentry_sdk.integrations.django import DjangoIntegration
|
||||||
|
|
||||||
|
sentry_sdk.init(
|
||||||
|
dsn=SENTRY_DSN,
|
||||||
|
integrations=[DjangoIntegration()],
|
||||||
|
release=NEODB_VERSION,
|
||||||
|
traces_sample_rate=1 if DEBUG else 0.01,
|
||||||
|
)
|
||||||
|
|
|
@ -30,6 +30,8 @@ x-shared:
|
||||||
NEODB_LOGIN_MASTODON_WHITELIST:
|
NEODB_LOGIN_MASTODON_WHITELIST:
|
||||||
NEODB_MASTODON_CLIENT_SCOPE:
|
NEODB_MASTODON_CLIENT_SCOPE:
|
||||||
NEODB_DISABLE_DEFAULT_RELAY:
|
NEODB_DISABLE_DEFAULT_RELAY:
|
||||||
|
NEODB_SENTRY_DSN:
|
||||||
|
TAKAHE_SENTRY_DSN:
|
||||||
NEODB_DB_URL: postgres://neodb:aubergine@neodb-db/neodb
|
NEODB_DB_URL: postgres://neodb:aubergine@neodb-db/neodb
|
||||||
TAKAHE_DB_URL: postgres://takahe:aubergine@takahe-db/takahe
|
TAKAHE_DB_URL: postgres://takahe:aubergine@takahe-db/takahe
|
||||||
NEODB_REDIS_URL: redis://redis:6379/0
|
NEODB_REDIS_URL: redis://redis:6379/0
|
||||||
|
|
|
@ -39,6 +39,7 @@ podcastparser
|
||||||
psycopg2-binary
|
psycopg2-binary
|
||||||
requests
|
requests
|
||||||
rq>=1.12.0
|
rq>=1.12.0
|
||||||
|
sentry-sdk
|
||||||
setproctitle
|
setproctitle
|
||||||
tqdm
|
tqdm
|
||||||
typesense
|
typesense
|
||||||
|
|
Loading…
Add table
Reference in a new issue