Skip to content

Commit 5d638b1

Browse files
authored
feat(cells) Add tracer logs to ReactPage (#104676)
In #104552 I want to make `ReactPage` control-only. This change *should* be a no-op for saas, but I want to make sure of that first by validating with real traffic. Refs INFRENG-238
1 parent 1da7aa5 commit 5d638b1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/sentry/web/frontend/react_page.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from sentry.models.organization import Organization
1616
from sentry.organizations.absolute_url import customer_domain_path, generate_organization_url
1717
from sentry.organizations.services.organization import organization_service
18+
from sentry.silo.base import SiloMode
1819
from sentry.types.region import (
1920
find_all_multitenant_region_names,
2021
get_region_by_name,
@@ -218,6 +219,18 @@ def handle_auth_required(self, request: HttpRequest, *args, **kwargs) -> HttpRes
218219
return super().handle_auth_required(request, *args, **kwargs)
219220

220221
def handle(self, request: HttpRequest, organization, **kwargs) -> HttpResponse:
222+
if SiloMode.get_current_mode() == SiloMode.REGION:
223+
# This shouldn't happen as all requests in production for HTML pages
224+
# should be in control.
225+
logger.info(
226+
"react_page.region_silo",
227+
extra={
228+
"url": request.get_full_path(),
229+
"method": request.method,
230+
"user-agent": request.headers.get("User-Agent"),
231+
},
232+
)
233+
221234
return self.handle_react(request, organization=organization)
222235

223236

0 commit comments

Comments
 (0)