File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed
Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 22
33Just add `` CeleryIntegration() `` to your `` integrations `` array. For example, in Django:
44
5+ import sentry_sdk
56 from sentry_sdk.integrations.celery import CeleryIntegration
67 from sentry_sdk.integrations.django import DjangoIntegration
7- from sentry_sdk import init
88
9- init(dsn="https://foo@sentry.io/123", integrations=[DjangoIntegration(), CeleryIntegration()])
9+ sentry_sdk. init(dsn="https://foo@sentry.io/123", integrations=[DjangoIntegration(), CeleryIntegration()])
1010
1111
1212With that, the transaction on the event will be set to the task name, and
Original file line number Diff line number Diff line change 22
33In your `` settings.py `` :
44
5+ import sentry_sdk
56 from sentry_sdk.integrations.django import DjangoIntegration
6- from sentry_sdk import init
77
8- init(dsn="https://foo@sentry.io/123", integrations=[DjangoIntegration()])
8+ sentry_sdk. init(dsn="https://foo@sentry.io/123", integrations=[DjangoIntegration()])
99
1010* All exceptions are reported.
1111
Original file line number Diff line number Diff line change 11# Using Sentry with Flask
22
3-
3+ import sentry_sdk
44 from sentry_sdk.integrations.flask import FlaskIntegration
5- from sentry_sdk import init
65
7- init(dsn="https://foo@sentry.io/123", integrations=[FlaskIntegration()])
6+ sentry_sdk. init(dsn="https://foo@sentry.io/123", integrations=[FlaskIntegration()])
87
98 app = Flask(__name__)
109
Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ Calling ``sentry_sdk.init()`` already captures any logging message with a level
44higher than or equal to `` INFO `` . You can change this behavior by explicitly
55passing the logging integration like any other:
66
7+ import sentry_sdk
78 from sentry_sdk.integrations.logging import LoggingIntegration
8- from sentry_sdk import init
99
1010 sentry_logging = LoggingIntegration(
1111 level=logging.DEBUG,
1212 event_level=logging.ERROR
1313 )
14- init(dsn="https://foo@sentry.io/123", integrations=[sentry_logging])
14+ sentry_sdk. init(dsn="https://foo@sentry.io/123", integrations=[sentry_logging])
1515
1616The above configuration captures * all* messages, now including `` DEBUG `` , as
1717breadcrumbs. Messages with level `` ERROR `` and above will show up as their own
You can’t perform that action at this time.
0 commit comments