Skip to content

Commit 825546a

Browse files
committed
Not need to set traces_sample_rate to None because its the default
1 parent 914cfa7 commit 825546a

File tree

5 files changed

+7
-25
lines changed

5 files changed

+7
-25
lines changed

tests/integrations/aiohttp/test_aiohttp.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,7 @@ async def hello(request):
461461
async def test_trace_from_headers_if_performance_disabled(
462462
sentry_init, aiohttp_client, capture_events
463463
):
464-
sentry_init(
465-
integrations=[AioHttpIntegration()],
466-
traces_sample_rate=None, # disable all performance monitoring
467-
)
464+
sentry_init(integrations=[AioHttpIntegration()])
468465

469466
async def hello(request):
470467
capture_message("It's a good day to try dividing by 0")

tests/integrations/asgi/test_asgi.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,7 @@ async def test_has_trace_if_performance_disabled(
269269
asgi3_app_with_error_and_msg,
270270
capture_events,
271271
):
272-
sentry_init(
273-
traces_sample_rate=None, # disable all performance monitoring
274-
)
272+
sentry_init()
275273
app = SentryAsgiMiddleware(asgi3_app_with_error_and_msg)
276274

277275
with pytest.raises(ZeroDivisionError):
@@ -327,9 +325,7 @@ async def test_trace_from_headers_if_performance_disabled(
327325
asgi3_app_with_error_and_msg,
328326
capture_events,
329327
):
330-
sentry_init(
331-
traces_sample_rate=None, # disable all performance monitoring
332-
)
328+
sentry_init()
333329
app = SentryAsgiMiddleware(asgi3_app_with_error_and_msg)
334330

335331
trace_id = "582b43a4192642f0b136d5159a501701"

tests/integrations/django/asgi/test_asgi.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,7 @@ async def test_has_trace_if_performance_enabled(sentry_init, capture_events):
335335
django.VERSION < (3, 1), reason="async views have been introduced in Django 3.1"
336336
)
337337
async def test_has_trace_if_performance_disabled(sentry_init, capture_events):
338-
sentry_init(
339-
integrations=[DjangoIntegration()],
340-
traces_sample_rate=None, # disable all performance monitoring
341-
)
338+
sentry_init(integrations=[DjangoIntegration()])
342339

343340
events = capture_events()
344341

@@ -401,10 +398,7 @@ async def test_trace_from_headers_if_performance_enabled(sentry_init, capture_ev
401398
django.VERSION < (3, 1), reason="async views have been introduced in Django 3.1"
402399
)
403400
async def test_trace_from_headers_if_performance_disabled(sentry_init, capture_events):
404-
sentry_init(
405-
integrations=[DjangoIntegration()],
406-
traces_sample_rate=None, # disable all performance monitoring
407-
)
401+
sentry_init(integrations=[DjangoIntegration()])
408402

409403
events = capture_events()
410404

tests/integrations/django/test_basic.py

-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ def test_trace_from_headers_if_performance_disabled(
241241
http_methods_to_capture=("HEAD",),
242242
)
243243
],
244-
traces_sample_rate=None, # disable all performance monitoring
245244
)
246245

247246
events = capture_events()

tests/integrations/wsgi/test_wsgi.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,7 @@ def dogpark(environ, start_response):
238238
capture_message("Attempting to fetch the ball")
239239
raise ValueError("Fetch aborted. The ball was not returned.")
240240

241-
sentry_init(
242-
traces_sample_rate=None, # disable all performance monitoring
243-
)
241+
sentry_init()
244242
app = SentryWsgiMiddleware(dogpark)
245243
client = Client(app)
246244
events = capture_events()
@@ -303,9 +301,7 @@ def dogpark(environ, start_response):
303301
capture_message("Attempting to fetch the ball")
304302
raise ValueError("Fetch aborted. The ball was not returned.")
305303

306-
sentry_init(
307-
traces_sample_rate=None, # disable all performance monitoring
308-
)
304+
sentry_init()
309305
app = SentryWsgiMiddleware(dogpark)
310306
client = Client(app)
311307
events = capture_events()

0 commit comments

Comments
 (0)