From e8decc5090f61e27ae8a41972b50d15c39db1698 Mon Sep 17 00:00:00 2001 From: Giovanni Barillari Date: Tue, 20 Jun 2023 14:40:27 +0200 Subject: [PATCH] Add integrations configuration option --- README.md | 3 ++- emmett_sentry/ext.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 00ae7ce..fe78b3b 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,9 @@ Here is the complete list of parameters of the extension configuration: | environment | development | Application environment | | release | | Application release | | auto\_load | `True` | Automatically inject extension on routes | -| enable\_tracing | `False` | Enable tracing on routes | | sample\_rate | 1 | Error sampling rate | +| integrations | | List of integrations to pass to the SDK | +| enable\_tracing | `False` | Enable tracing on routes | | tracing\_sample\_rate | | Traces sampling rate | | tracing\_exclude\_routes | | List of specific routes to exclude from tracing | | trace\_websockets | `False` | Enable tracing on websocket routes | diff --git a/emmett_sentry/ext.py b/emmett_sentry/ext.py index 5fd2d27..6bd50c2 100644 --- a/emmett_sentry/ext.py +++ b/emmett_sentry/ext.py @@ -27,7 +27,8 @@ class Sentry(Extension): trace_templates=True, trace_sessions=True, trace_cache=True, - trace_pipes=False + trace_pipes=False, + integrations=[] ) _initialized = False _errmsg = "You need to configure Sentry extension before using its methods" @@ -44,7 +45,8 @@ def on_load(self): release=self.config.release, sample_rate=self.config.sample_rate, traces_sample_rate=self.config.tracing_sample_rate, - before_send=self._before_send + before_send=self._before_send, + integrations=self.config.integrations ) if self.config.auto_load: patch_routers(self)