Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ v9.9.9 (unreleased)
breaking:

- backend/slack: remove slack and slack_rtm built-in backends (#1581)
- core/logging: deprecate SENTRY_TRANSPORT config (#1604)

features:

Expand Down
1 change: 0 additions & 1 deletion docs/user_guide/sentry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ To setup Errbot with Sentry:
* Open up your bot's config.py
* Set **BOT_LOG_SENTRY** to *True* and fill in **SENTRY_DSN** with the DSN value obtained previously
* Optionally adjust **SENTRY_LOGLEVEL** to the desired level
* Optionally adjust **SENTRY_TRANSPORT** to the desired transport
* Optionally adjust **SENTRY_OPTIONS** to customise the rest of the initialization.
* Restart Errbot

Expand Down
5 changes: 5 additions & 0 deletions errbot/bootstrap.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import importlib
import logging
import sys
import warnings
from os import makedirs, path
from typing import Callable, Optional

Expand Down Expand Up @@ -135,6 +136,10 @@ def setup_bot(
if hasattr(config, "SENTRY_TRANSPORT") and isinstance(
config.SENTRY_TRANSPORT, tuple
):
warnings.warn(
"SENTRY_TRANSPORT is deprecated. Please use SENTRY_OPTIONS instead.",
DeprecationWarning,
)
try:
mod = importlib.import_module(config.SENTRY_TRANSPORT[1])
transport = getattr(mod, config.SENTRY_TRANSPORT[0])
Expand Down
8 changes: 2 additions & 6 deletions errbot/config-template.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,8 @@
SENTRY_LOGLEVEL = BOT_LOG_LEVEL
SENTRY_EVENTLEVEL = BOT_LOG_LEVEL

# Set an optional Sentry transport other than the default Threaded.
# For more info, see https://docs.sentry.io/error-reporting/configuration/?platform=python#transport-options
# SENTRY_TRANSPORT = ("RequestsHTTPTransport", "raven.transport.requests")

# Any other options that can be passed to sentry_sdk.init() at initialization time
# Note that dsn and transport should be specified via their dedicated setting,
# Options that can be passed to sentry_sdk.init() at initialization time
# Note that DSN should be specified via its dedicated config option
# and that the 'integrations' setting cannot be set
# e.g: SENTRY_OPTIONS = {"environment": "production"}
SENTRY_OPTIONS = {}
Expand Down