Skip to content

Commit ebf1635

Browse files
authored
ref(events): Singularize pluralized params in the events endpoint (#103923)
- These params were a bit odd in that they were plural when everything else is singular
1 parent 35c0a62 commit ebf1635

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/sentry/api/endpoints/organization_events.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,9 @@ def paginator_factory(scoped_dataset):
504504
dashboard_widget_id = request.GET.get("dashboardWidgetId", None)
505505
discover_saved_query_id = request.GET.get("discoverSavedQueryId", None)
506506
additional_queries = AdditionalQueries(
507-
span=request.GET.getlist("spanQueries"),
508-
log=request.GET.getlist("logQueries"),
509-
metric=request.GET.getlist("metricQueries"),
507+
span=request.GET.getlist("spanQuery"),
508+
log=request.GET.getlist("logQuery"),
509+
metric=request.GET.getlist("metricQuery"),
510510
)
511511

512512
def get_rpc_config():

tests/snuba/api/endpoints/test_organization_events_cross_trace.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_cross_trace_query_with_logs(self) -> None:
5050
"orderby": "count()",
5151
"project": self.project.id,
5252
"dataset": "spans",
53-
"logQueries": ["message:foo"],
53+
"logQuery": ["message:foo"],
5454
}
5555
)
5656

@@ -102,7 +102,7 @@ def test_cross_trace_query_with_spans(self) -> None:
102102
"orderby": "count()",
103103
"project": self.project.id,
104104
"dataset": "spans",
105-
"spanQueries": ["tags[foo]:six"],
105+
"spanQuery": ["tags[foo]:six"],
106106
}
107107
)
108108

@@ -167,8 +167,8 @@ def test_cross_trace_query_with_spans_and_logs(self) -> None:
167167
"orderby": "count()",
168168
"project": self.project.id,
169169
"dataset": "spans",
170-
"spanQueries": ["tags[foo]:six"],
171-
"logQueries": ["message:foo"],
170+
"spanQuery": ["tags[foo]:six"],
171+
"logQuery": ["message:foo"],
172172
}
173173
)
174174

@@ -230,7 +230,7 @@ def test_cross_trace_query_with_multiple_spans(self) -> None:
230230
"orderby": "count()",
231231
"project": self.project.id,
232232
"dataset": "spans",
233-
"spanQueries": ["tags[foo]:six", "tags[foo]:seven"],
233+
"spanQuery": ["tags[foo]:six", "tags[foo]:seven"],
234234
}
235235
)
236236

@@ -288,7 +288,7 @@ def test_cross_trace_qurey_with_multiple_logs(self) -> None:
288288
"orderby": "count()",
289289
"project": self.project.id,
290290
"dataset": "spans",
291-
"logQueries": ["message:faa", "message:foo"],
291+
"logQuery": ["message:faa", "message:foo"],
292292
}
293293
)
294294

0 commit comments

Comments
 (0)