Skip to content

Commit 6c7e23b

Browse files
committed
Add TODO message as a reminder to simplify reading span data
1 parent b225a3e commit 6c7e23b

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

src/sentry/utils/performance_issues/detectors/consecutive_db_detector.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ def is_event_eligible(cls, event, project: Project = None) -> bool:
216216

217217
if request:
218218
url = request.get("url", "") or ""
219+
# TODO(nar): `method` can be removed once SDK adoption has increased and
220+
# we are receiving `http.method` consistently, likely beyond October 2023
219221
method = request.get("http.method", "") or request.get("method", "") or ""
220222
if url.endswith("/graphql") and method.lower() in ["post", "get"]:
221223
return False

src/sentry/utils/performance_issues/detectors/large_payload_detector.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ def visit_span(self, span: Span) -> None:
2424
return
2525

2626
data = span.get("data", None)
27+
# TODO(nar): `Encoded Body Size` can be removed once SDK adoption has increased and
28+
# we are receiving `http.response_content_length` consistently, likely beyond October 2023
2729
encoded_body_size = data and (
2830
data.get("http.response_content_length", None) or data.get("Encoded Body Size")
2931
)

src/sentry/utils/performance_issues/detectors/render_blocking_asset_span_detector.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ def _is_blocking_render(self, span):
100100
return False
101101

102102
minimum_size_bytes = self.settings.get("minimum_size_bytes")
103+
# TODO(nar): `Encoded Body Size` can be removed once SDK adoption has increased and
104+
# we are receiving `http.response_content_length` consistently, likely beyond October 2023
103105
encoded_body_size = (
104106
data
105107
and (data.get("http.response_content_length", 0) or data.get("Encoded Body Size", 0))

src/sentry/utils/performance_issues/detectors/uncompressed_asset_detector.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ def visit_span(self, span: Span) -> None:
3636
return
3737

3838
data = span.get("data", None)
39+
# TODO(nar): The sentence-style keys can be removed once SDK adoption has increased and
40+
# we are receiving snake_case keys consistently, likely beyond October 2023
3941
transfer_size = data and (
4042
data.get("http.transfer_size", None) or data.get("Transfer Size", None)
4143
)

0 commit comments

Comments
 (0)