Skip to content

Commit 7aa62ff

Browse files
wmakevanh
authored andcommitted
fix(rpc): Handle transaction correctly (#81071)
- Transaction accidentally had the is_event_id validator on it
1 parent aa2a595 commit 7aa62ff

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

src/sentry/search/eap/columns.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ def simple_measurements_field(field) -> ResolvedColumn:
254254
public_alias="transaction",
255255
internal_name="sentry.segment_name",
256256
search_type="string",
257-
validator=is_event_id,
258257
),
259258
ResolvedColumn(
260259
public_alias="replay.id",

tests/snuba/api/endpoints/test_organization_events_span_indexed.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,38 @@ def test_environment(self):
698698
{"environment": "prod", "count()": 1},
699699
]
700700

701+
def test_transaction(self):
702+
self.store_spans(
703+
[
704+
self.create_span(
705+
{"description": "foo", "sentry_tags": {"transaction": "bar"}},
706+
start_ts=self.ten_mins_ago,
707+
),
708+
],
709+
is_eap=self.is_eap,
710+
)
711+
response = self.do_request(
712+
{
713+
"field": ["description", "count()"],
714+
"query": "transaction:bar",
715+
"orderby": "description",
716+
"project": self.project.id,
717+
"dataset": self.dataset,
718+
}
719+
)
720+
721+
assert response.status_code == 200, response.content
722+
data = response.data["data"]
723+
meta = response.data["meta"]
724+
assert len(data) == 1
725+
assert data == [
726+
{
727+
"description": "foo",
728+
"count()": 1,
729+
},
730+
]
731+
assert meta["dataset"] == self.dataset
732+
701733

702734
class OrganizationEventsEAPSpanEndpointTest(OrganizationEventsSpanIndexedEndpointTest):
703735
is_eap = True

0 commit comments

Comments
 (0)