Skip to content

Commit 63369e8

Browse files
authored
add sentry arguments (#1433)
* add sentry arguments add optional args for sentry_sdk.init() to further personalize the sentry handler * Update sentry.py change way of passing args. instead of dict it takes **kwargs
1 parent 168311f commit 63369e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

interactions/ext/sentry.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,13 @@ def setup(
9191
bot: Client,
9292
token: str = None,
9393
filter: Optional[Callable[[dict[str, Any], dict[str, Any]], Optional[dict[str, Any]]]] = None,
94+
**kwargs,
9495
) -> None:
9596
if not token:
9697
bot.logger.error("Cannot enable sentry integration, no token provided")
9798
return
9899
if filter is None:
99100
filter = default_sentry_filter
100-
sentry_sdk.init(token, before_send=filter)
101+
sentry_sdk.init(token, before_send=filter, **kwargs)
101102
Task.on_error_sentry_hook = HookedTask.on_error_sentry_hook # type: ignore
102103
SentryExtension(bot)

0 commit comments

Comments
 (0)