File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -466,8 +466,8 @@ def append(envelope):
466466
467467 def flush (timeout = None , callback = None ):
468468 real_flush (timeout = timeout , callback = callback )
469- items_w .write (json .dumps (telemetry ).encode ("utf-8" ))
470- items_w .write (b"\n " )
469+ items_w .write (json .dumps (telemetry ).encode ("utf-8" ) + b" \n " )
470+ items_w .write (b"flush \n " )
471471
472472 monkeypatch .setattr (test_client .transport , "capture_envelope" , append )
473473 monkeypatch .setattr (test_client , "flush" , flush )
Original file line number Diff line number Diff line change 66
77import sentry_sdk
88from sentry_sdk import start_transaction
9+ from sentry_sdk .consts import SPANDATA
910from sentry_sdk .integrations .rq import RqIntegration
1011from sentry_sdk .utils import SENSITIVE_DATA_SUBSTITUTE , parse_version
1112
@@ -197,6 +198,10 @@ def test_transaction_with_error(
197198 spans [44 ]["attributes" ]["sentry.origin" ]
198199 == error_event ["contexts" ]["trace" ]["origin" ]
199200 )
201+ assert (
202+ spans [44 ]["attributes" ][SPANDATA .CODE_FUNCTION_NAME ]
203+ == "tests.integrations.rq.test_rq.chew_up_shoes"
204+ )
200205 else :
201206 events = capture_events ()
202207
@@ -360,7 +365,6 @@ def test_tracing_disabled(
360365 events = capture_events ()
361366
362367 scope = sentry_sdk .get_isolation_scope ()
363-
364368 queue .enqueue (crashing_job , foo = None )
365369 worker .work (burst = True )
366370
You can’t perform that action at this time.
0 commit comments