Skip to content

Commit

Permalink
Add integrations configuration option
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Jun 20, 2023
1 parent 29adae7 commit e8decc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
6 changes: 4 additions & 2 deletions emmett_sentry/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down

0 comments on commit e8decc5

Please sign in to comment.