@@ -623,13 +623,13 @@ def test_request_capture(django_elasticapm_client):
623623
624624def test_transaction_request_response_data (django_elasticapm_client , client ):
625625 client .cookies = SimpleCookie ({'foo' : 'bar' })
626- django_elasticapm_client .instrumentation_store .get_all ()
626+ django_elasticapm_client .transaction_store .get_all ()
627627 with override_settings (** middleware_setting (
628628 django .VERSION , ['elasticapm.contrib.django.middleware.TracingMiddleware' ]
629629 )):
630630 client .get (reverse ('elasticapm-no-error' ))
631- assert len (django_elasticapm_client .instrumentation_store ) == 1
632- transactions = django_elasticapm_client .instrumentation_store .get_all ()
631+ assert len (django_elasticapm_client .transaction_store ) == 1
632+ transactions = django_elasticapm_client .transaction_store .get_all ()
633633 assert len (transactions ) == 1
634634 transaction = transactions [0 ]
635635 assert transaction ['result' ] == 'HTTP 2xx'
@@ -652,15 +652,15 @@ def test_transaction_request_response_data(django_elasticapm_client, client):
652652
653653
654654def test_transaction_metrics (django_elasticapm_client , client ):
655- django_elasticapm_client .instrumentation_store .get_all () # clear the store
655+ django_elasticapm_client .transaction_store .get_all () # clear the store
656656 with override_settings (** middleware_setting (
657657 django .VERSION , ['elasticapm.contrib.django.middleware.TracingMiddleware' ]
658658 )):
659- assert len (django_elasticapm_client .instrumentation_store ) == 0
659+ assert len (django_elasticapm_client .transaction_store ) == 0
660660 client .get (reverse ('elasticapm-no-error' ))
661- assert len (django_elasticapm_client .instrumentation_store ) == 1
661+ assert len (django_elasticapm_client .transaction_store ) == 1
662662
663- transactions = django_elasticapm_client .instrumentation_store .get_all ()
663+ transactions = django_elasticapm_client .transaction_store .get_all ()
664664
665665 assert len (transactions ) == 1
666666 transaction = transactions [0 ]
@@ -673,9 +673,9 @@ def test_transaction_metrics_debug(django_elasticapm_client, client):
673673 with override_settings (DEBUG = True , ** middleware_setting (
674674 django .VERSION , ['elasticapm.contrib.django.middleware.TracingMiddleware' ]
675675 )):
676- assert len (django_elasticapm_client .instrumentation_store ) == 0
676+ assert len (django_elasticapm_client .transaction_store ) == 0
677677 client .get (reverse ('elasticapm-no-error' ))
678- assert len (django_elasticapm_client .instrumentation_store ) == 0
678+ assert len (django_elasticapm_client .transaction_store ) == 0
679679
680680
681681@pytest .mark .parametrize ('django_elasticapm_client' , [
@@ -687,13 +687,13 @@ def test_transaction_metrics_debug_and_client_debug(django_elasticapm_client, cl
687687 with override_settings (DEBUG = True , ** middleware_setting (
688688 django .VERSION , ['elasticapm.contrib.django.middleware.TracingMiddleware' ]
689689 )):
690- assert len (django_elasticapm_client .instrumentation_store ) == 0
690+ assert len (django_elasticapm_client .transaction_store ) == 0
691691 client .get (reverse ('elasticapm-no-error' ))
692- assert len (django_elasticapm_client .instrumentation_store ) == 1
692+ assert len (django_elasticapm_client .transaction_store ) == 1
693693
694694
695695def test_request_metrics_301_append_slash (django_elasticapm_client , client ):
696- django_elasticapm_client .instrumentation_store .get_all () # clear the store
696+ django_elasticapm_client .transaction_store .get_all () # clear the store
697697
698698 # enable middleware wrapping
699699 django_elasticapm_client .config .instrument_django_middleware = True
@@ -709,7 +709,7 @@ def test_request_metrics_301_append_slash(django_elasticapm_client, client):
709709 ])
710710 ):
711711 client .get (reverse ('elasticapm-no-error-slash' )[:- 1 ])
712- transactions = django_elasticapm_client .instrumentation_store .get_all ()
712+ transactions = django_elasticapm_client .transaction_store .get_all ()
713713 assert transactions [0 ]['name' ] in (
714714 # django <= 1.8
715715 'GET django.middleware.common.CommonMiddleware.process_request' ,
@@ -720,7 +720,7 @@ def test_request_metrics_301_append_slash(django_elasticapm_client, client):
720720
721721
722722def test_request_metrics_301_prepend_www (django_elasticapm_client , client ):
723- django_elasticapm_client .instrumentation_store .get_all () # clear the store
723+ django_elasticapm_client .transaction_store .get_all () # clear the store
724724
725725 # enable middleware wrapping
726726 django_elasticapm_client .config .instrument_django_middleware = True
@@ -736,14 +736,14 @@ def test_request_metrics_301_prepend_www(django_elasticapm_client, client):
736736 ])
737737 ):
738738 client .get (reverse ('elasticapm-no-error' ))
739- transactions = django_elasticapm_client .instrumentation_store .get_all ()
739+ transactions = django_elasticapm_client .transaction_store .get_all ()
740740 assert transactions [0 ]['name' ] == 'GET django.middleware.common.CommonMiddleware.process_request'
741741 assert transactions [0 ]['result' ] == 'HTTP 3xx'
742742
743743
744744@pytest .mark .django_db
745745def test_request_metrics_contrib_redirect (django_elasticapm_client , client ):
746- django_elasticapm_client .instrumentation_store .get_all () # clear the store
746+ django_elasticapm_client .transaction_store .get_all () # clear the store
747747
748748 # enable middleware wrapping
749749 django_elasticapm_client .config .instrument_django_middleware = True
@@ -761,18 +761,18 @@ def test_request_metrics_contrib_redirect(django_elasticapm_client, client):
761761 ):
762762 response = client .get ('/redirect/me/' )
763763
764- transactions = django_elasticapm_client .instrumentation_store .get_all ()
764+ transactions = django_elasticapm_client .transaction_store .get_all ()
765765 assert transactions [0 ]['name' ] == 'GET django.contrib.redirects.middleware.RedirectFallbackMiddleware.process_response'
766766 assert transactions [0 ]['result' ] == 'HTTP 3xx'
767767
768768
769769def test_request_metrics_404_resolve_error (django_elasticapm_client , client ):
770- django_elasticapm_client .instrumentation_store .get_all () # clear the store
770+ django_elasticapm_client .transaction_store .get_all () # clear the store
771771 with override_settings (
772772 ** middleware_setting (django .VERSION , ['elasticapm.contrib.django.middleware.TracingMiddleware' ])
773773 ):
774774 client .get ('/i-dont-exist/' )
775- transactions = django_elasticapm_client .instrumentation_store .get_all ()
775+ transactions = django_elasticapm_client .transaction_store .get_all ()
776776 assert transactions [0 ]['name' ] == ''
777777
778778
@@ -784,7 +784,7 @@ def test_request_metrics_streaming(django_elasticapm_client, client):
784784 resp = client .get (reverse ('elasticapm-streaming-view' ))
785785 assert list (resp .streaming_content ) == [b'0' , b'1' , b'2' , b'3' , b'4' ]
786786 resp .close ()
787- transaction = django_elasticapm_client .instrumentation_store .get_all ()[0 ]
787+ transaction = django_elasticapm_client .transaction_store .get_all ()[0 ]
788788 assert transaction ['result' ] == 'HTTP 2xx'
789789 assert transaction ['duration' ] >= 50
790790 assert len (transaction ['spans' ]) == 5
@@ -795,7 +795,7 @@ def test_request_metrics_name_override(django_elasticapm_client, client):
795795 ** middleware_setting (django .VERSION , ['elasticapm.contrib.django.middleware.TracingMiddleware' ])
796796 ):
797797 client .get (reverse ('elasticapm-name-override' ))
798- transaction = django_elasticapm_client .instrumentation_store .get_all ()[0 ]
798+ transaction = django_elasticapm_client .transaction_store .get_all ()[0 ]
799799 assert transaction ['name' ] == 'foo'
800800 assert transaction ['result' ] == 'okydoky'
801801
@@ -936,7 +936,7 @@ def test_stacktraces_have_templates(client, django_elasticapm_client):
936936 resp = client .get (reverse ("render-heavy-template" ))
937937 assert resp .status_code == 200
938938
939- transactions = django_elasticapm_client .instrumentation_store .get_all ()
939+ transactions = django_elasticapm_client .transaction_store .get_all ()
940940 assert len (transactions ) == 1
941941 transaction = transactions [0 ]
942942 assert transaction ['result' ] == 'HTTP 2xx'
@@ -968,7 +968,7 @@ def test_stacktrace_filtered_for_elasticapm(client, django_elasticapm_client):
968968 resp = client .get (reverse ("render-heavy-template" ))
969969 assert resp .status_code == 200
970970
971- transactions = django_elasticapm_client .instrumentation_store .get_all ()
971+ transactions = django_elasticapm_client .transaction_store .get_all ()
972972 assert transactions [0 ]['result' ] == 'HTTP 2xx'
973973 spans = transactions [0 ]['spans' ]
974974
@@ -994,7 +994,7 @@ def test_perf_template_render(benchmark, client, django_elasticapm_client):
994994 for resp in responses :
995995 assert resp .status_code == 200
996996
997- transactions = django_elasticapm_client .instrumentation_store .get_all ()
997+ transactions = django_elasticapm_client .transaction_store .get_all ()
998998
999999 # If the test falls right at the change from one minute to another
10001000 # this will have two items.
@@ -1016,15 +1016,15 @@ def test_perf_template_render_no_middleware(benchmark, client, django_elasticapm
10161016 for resp in responses :
10171017 assert resp .status_code == 200
10181018
1019- transactions = django_elasticapm_client .instrumentation_store .get_all ()
1019+ transactions = django_elasticapm_client .transaction_store .get_all ()
10201020 assert len (transactions ) == 0
10211021
10221022
10231023@pytest .mark .parametrize ('django_elasticapm_client' , [{'_wait_to_first_send' : 100 }], indirect = True )
10241024@pytest .mark .django_db (transaction = True )
10251025def test_perf_database_render (benchmark , client , django_elasticapm_client ):
10261026 responses = []
1027- django_elasticapm_client .instrumentation_store .get_all ()
1027+ django_elasticapm_client .transaction_store .get_all ()
10281028
10291029 with mock .patch ("elasticapm.traces.TransactionsStore.should_collect" ) as should_collect :
10301030 should_collect .return_value = False
@@ -1037,7 +1037,7 @@ def test_perf_database_render(benchmark, client, django_elasticapm_client):
10371037 for resp in responses :
10381038 assert resp .status_code == 200
10391039
1040- transactions = django_elasticapm_client .instrumentation_store .get_all ()
1040+ transactions = django_elasticapm_client .transaction_store .get_all ()
10411041
10421042 assert len (transactions ) == len (responses )
10431043 for transaction in transactions :
@@ -1047,7 +1047,7 @@ def test_perf_database_render(benchmark, client, django_elasticapm_client):
10471047@pytest .mark .django_db
10481048@pytest .mark .parametrize ('django_elasticapm_client' , [{'_wait_to_first_send' : 100 }], indirect = True )
10491049def test_perf_database_render_no_instrumentation (benchmark , django_elasticapm_client ):
1050- django_elasticapm_client .instrumentation_store .get_all ()
1050+ django_elasticapm_client .transaction_store .get_all ()
10511051 responses = []
10521052 with mock .patch ("elasticapm.traces.TransactionsStore.should_collect" ) as should_collect :
10531053 should_collect .return_value = False
@@ -1060,7 +1060,7 @@ def test_perf_database_render_no_instrumentation(benchmark, django_elasticapm_cl
10601060 for resp in responses :
10611061 assert resp .status_code == 200
10621062
1063- transactions = django_elasticapm_client .instrumentation_store .get_all ()
1063+ transactions = django_elasticapm_client .transaction_store .get_all ()
10641064 assert len (transactions ) == 0
10651065
10661066
@@ -1070,7 +1070,7 @@ def test_perf_database_render_no_instrumentation(benchmark, django_elasticapm_cl
10701070 'flush_interval' : 100
10711071}], indirect = True )
10721072def test_perf_transaction_with_collection (benchmark , django_elasticapm_client ):
1073- django_elasticapm_client .instrumentation_store .get_all ()
1073+ django_elasticapm_client .transaction_store .get_all ()
10741074 with mock .patch ("elasticapm.traces.TransactionsStore.should_collect" ) as should_collect :
10751075 should_collect .return_value = False
10761076 django_elasticapm_client .events = []
@@ -1102,7 +1102,7 @@ def result():
11021102@pytest .mark .django_db
11031103@pytest .mark .parametrize ('django_elasticapm_client' , [{'_wait_to_first_send' : 100 }], indirect = True )
11041104def test_perf_transaction_without_middleware (benchmark , django_elasticapm_client ):
1105- django_elasticapm_client .instrumentation_store .get_all ()
1105+ django_elasticapm_client .transaction_store .get_all ()
11061106 with mock .patch ("elasticapm.traces.TransactionsStore.should_collect" ) as should_collect :
11071107 should_collect .return_value = False
11081108 client = _TestClient ()
@@ -1281,7 +1281,7 @@ def test_tracing_middleware_uses_test_client(client, django_elasticapm_client):
12811281 'elasticapm.contrib.django.middleware.TracingMiddleware'
12821282 ])):
12831283 client .get ('/' )
1284- transactions = django_elasticapm_client .instrumentation_store .get_all ()
1284+ transactions = django_elasticapm_client .transaction_store .get_all ()
12851285 assert len (transactions ) == 1
12861286 assert transactions [0 ]['context' ]['request' ]['url' ]['pathname' ] == '/'
12871287
@@ -1387,5 +1387,5 @@ def test_options_request(client, django_elasticapm_client):
13871387 'elasticapm.contrib.django.middleware.TracingMiddleware'
13881388 ])):
13891389 client .options ('/' )
1390- transactions = django_elasticapm_client .instrumentation_store .get_all ()
1390+ transactions = django_elasticapm_client .transaction_store .get_all ()
13911391 assert transactions [0 ]['context' ]['request' ]['method' ] == 'OPTIONS'
0 commit comments