151151from sentry .users .models .useremail import UserEmail
152152from sentry .utils import json
153153from sentry .utils .auth import SsoSession
154+ from sentry .utils .eap import EAP_ITEMS_INSERT_ENDPOINT
154155from sentry .utils .json import dumps_htmlsafe
155156from sentry .utils .not_set import NOT_SET , NotSet , default_if_not_set
156157from sentry .utils .samples import load_data
@@ -1147,7 +1148,7 @@ def store_spans(self, spans, is_eap=False):
11471148 files [f"item_{ i } " ] = trace_item .SerializeToString ()
11481149 assert (
11491150 requests .post (
1150- settings .SENTRY_SNUBA + "/tests/entities/eap_items/insert_bytes" ,
1151+ settings .SENTRY_SNUBA + EAP_ITEMS_INSERT_ENDPOINT ,
11511152 files = files ,
11521153 ).status_code
11531154 == 200
@@ -1164,7 +1165,7 @@ def store_spans(self, spans, is_eap=False):
11641165 def store_ourlogs (self , ourlogs ):
11651166 files = {f"log_{ i } " : log .SerializeToString () for i , log in enumerate (ourlogs )}
11661167 response = requests .post (
1167- settings .SENTRY_SNUBA + "/tests/entities/eap_items/insert_bytes" ,
1168+ settings .SENTRY_SNUBA + EAP_ITEMS_INSERT_ENDPOINT ,
11681169 files = files ,
11691170 )
11701171 assert response .status_code == 200
@@ -1175,7 +1176,7 @@ def store_trace_metrics(self, trace_metrics):
11751176 for i , trace_metric in enumerate (trace_metrics )
11761177 }
11771178 response = requests .post (
1178- settings .SENTRY_SNUBA + "/tests/entities/eap_items/insert_bytes" ,
1179+ settings .SENTRY_SNUBA + EAP_ITEMS_INSERT_ENDPOINT ,
11791180 files = files ,
11801181 )
11811182 assert response .status_code == 200
@@ -1186,7 +1187,7 @@ def store_profile_functions(self, profile_functions):
11861187 for i , profile_function in enumerate (profile_functions )
11871188 }
11881189 response = requests .post (
1189- settings .SENTRY_SNUBA + "/tests/entities/eap_items/insert_bytes" ,
1190+ settings .SENTRY_SNUBA + EAP_ITEMS_INSERT_ENDPOINT ,
11901191 files = files ,
11911192 )
11921193 assert response .status_code == 200
@@ -2266,7 +2267,7 @@ def store_spans(self, spans, is_eap=False):
22662267 files [f"item_{ i } " ] = trace_item .SerializeToString ()
22672268 assert (
22682269 requests .post (
2269- settings .SENTRY_SNUBA + "/tests/entities/eap_items/insert_bytes" ,
2270+ settings .SENTRY_SNUBA + EAP_ITEMS_INSERT_ENDPOINT ,
22702271 files = files ,
22712272 ).status_code
22722273 == 200
@@ -3897,7 +3898,7 @@ def store_replays_eap(self, replays):
38973898
38983899 files = {f"replay_{ i } " : replay .SerializeToString () for i , replay in enumerate (replays )}
38993900 response = requests .post (
3900- settings .SENTRY_SNUBA + "/tests/entities/eap_items/insert_bytes" ,
3901+ settings .SENTRY_SNUBA + EAP_ITEMS_INSERT_ENDPOINT ,
39013902 files = files ,
39023903 )
39033904 assert response .status_code == 200
@@ -4044,7 +4045,7 @@ def store_uptime_results(self, uptime_results):
40444045 f"uptime_{ i } " : result .SerializeToString () for i , result in enumerate (uptime_results )
40454046 }
40464047 response = requests .post (
4047- settings .SENTRY_SNUBA + "/tests/entities/eap_items/insert_bytes" ,
4048+ settings .SENTRY_SNUBA + EAP_ITEMS_INSERT_ENDPOINT ,
40484049 files = files ,
40494050 )
40504051 assert response .status_code == 200
0 commit comments