Skip to content

Commit 1cd0cab

Browse files
committed
ref: Remove client_options from event_from_exception
1 parent ffb9b8d commit 1cd0cab

51 files changed

Lines changed: 3 additions & 97 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎sentry_sdk/integrations/aiohttp.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ def _capture_exception() -> "ExcInfo":
503503
exc_info = sys.exc_info()
504504
event, hint = event_from_exception(
505505
exc_info,
506-
client_options=sentry_sdk.get_client().options,
507506
mechanism={"type": "aiohttp", "handled": False},
508507
)
509508
sentry_sdk.capture_event(event, hint=hint)

‎sentry_sdk/integrations/anthropic.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ def setup_once() -> None:
266266
def _capture_exception(exc: "Any") -> None:
267267
event, hint = event_from_exception(
268268
exc,
269-
client_options=sentry_sdk.get_client().options,
270269
mechanism={"type": "anthropic", "handled": False},
271270
)
272271
sentry_sdk.capture_event(event, hint=hint)

‎sentry_sdk/integrations/ariadne.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ def _sentry_patched_handle_graphql_errors(
8080
for error in errors:
8181
event, hint = event_from_exception(
8282
error,
83-
client_options=client.options,
8483
mechanism={
8584
"type": AriadneIntegration.identifier,
8685
"handled": False,
@@ -105,7 +104,6 @@ def _sentry_patched_handle_query_result(
105104
for error in result.errors or []:
106105
event, hint = event_from_exception(
107106
error,
108-
client_options=client.options,
109107
mechanism={
110108
"type": AriadneIntegration.identifier,
111109
"handled": False,

‎sentry_sdk/integrations/arq.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ def _capture_exception(exc_info: "ExcInfo") -> None:
127127

128128
event, hint = event_from_exception(
129129
exc_info,
130-
client_options=sentry_sdk.get_client().options,
131130
mechanism={"type": ArqIntegration.identifier, "handled": False},
132131
)
133132
sentry_sdk.capture_event(event, hint=hint)

‎sentry_sdk/integrations/asgi.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
def _capture_exception(exc: "Any", mechanism_type: str = "asgi") -> None:
6565
event, hint = event_from_exception(
6666
exc,
67-
client_options=sentry_sdk.get_client().options,
6867
mechanism={"type": mechanism_type, "handled": False},
6968
)
7069
sentry_sdk.capture_event(event, hint=hint)

‎sentry_sdk/integrations/asyncio.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ def _capture_exception() -> "ExcInfo":
202202
if integration is not None:
203203
event, hint = event_from_exception(
204204
exc_info,
205-
client_options=client.options,
206205
mechanism={"type": "asyncio", "handled": False},
207206
)
208207
sentry_sdk.capture_event(event, hint=hint)

‎sentry_sdk/integrations/aws_lambda.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,13 @@ def _get_user_from_event(aws_event: "dict[str, Any]") -> "dict[str, Any]":
6565
def _wrap_init_error(init_error: "F") -> "F":
6666
@ensure_integration_enabled(AwsLambdaIntegration, init_error)
6767
def sentry_init_error(*args: "Any", **kwargs: "Any") -> "Any":
68-
client = sentry_sdk.get_client()
69-
7068
with capture_internal_exceptions():
7169
sentry_sdk.get_isolation_scope().clear_breadcrumbs()
7270

7371
exc_info = sys.exc_info()
7472
if exc_info and all(exc_info):
7573
sentry_event, hint = event_from_exception(
7674
exc_info,
77-
client_options=client.options,
7875
mechanism={"type": "aws_lambda", "handled": False},
7976
)
8077
sentry_sdk.capture_event(sentry_event, hint=hint)
@@ -231,7 +228,6 @@ def sentry_handler(
231228
exc_info = sys.exc_info()
232229
sentry_event, hint = event_from_exception(
233230
exc_info,
234-
client_options=client.options,
235231
mechanism={"type": "aws_lambda", "handled": False},
236232
)
237233
sentry_sdk.capture_event(sentry_event, hint=hint)

‎sentry_sdk/integrations/beam.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,8 @@ def _capture_exception(exc_info: "ExcInfo") -> None:
136136
"""
137137
Send Beam exception to Sentry.
138138
"""
139-
client = sentry_sdk.get_client()
140-
141139
event, hint = event_from_exception(
142140
exc_info,
143-
client_options=client.options,
144141
mechanism={"type": "beam", "handled": False},
145142
)
146143
sentry_sdk.capture_event(event, hint=hint)

‎sentry_sdk/integrations/bottle.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ def event_processor(event: "Event", hint: "dict[str, Any]") -> "Event":
208208
def _capture_exception(exception: BaseException, handled: bool) -> None:
209209
event, hint = event_from_exception(
210210
exception,
211-
client_options=sentry_sdk.get_client().options,
212211
mechanism={"type": "bottle", "handled": handled},
213212
)
214213
sentry_sdk.capture_event(event, hint=hint)

‎sentry_sdk/integrations/celery/__init__.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ def _capture_exception(task: "Any", exc_info: "ExcInfo") -> None:
115115

116116
event, hint = event_from_exception(
117117
exc_info,
118-
client_options=client.options,
119118
mechanism={"type": "celery", "handled": False},
120119
)
121120

0 commit comments

Comments
 (0)