Skip to content

Commit

Permalink
fix(rpc): Handle transaction correctly (#81071)
Browse files Browse the repository at this point in the history
- Transaction accidentally had the is_event_id validator on it
  • Loading branch information
wmak authored Nov 20, 2024
1 parent aa58942 commit a213dc8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/sentry/search/eap/columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ def simple_measurements_field(field) -> ResolvedColumn:
public_alias="transaction",
internal_name="sentry.segment_name",
search_type="string",
validator=is_event_id,
),
ResolvedColumn(
public_alias="replay.id",
Expand Down
32 changes: 32 additions & 0 deletions tests/snuba/api/endpoints/test_organization_events_span_indexed.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,38 @@ def test_environment(self):
{"environment": "prod", "count()": 1},
]

def test_transaction(self):
self.store_spans(
[
self.create_span(
{"description": "foo", "sentry_tags": {"transaction": "bar"}},
start_ts=self.ten_mins_ago,
),
],
is_eap=self.is_eap,
)
response = self.do_request(
{
"field": ["description", "count()"],
"query": "transaction:bar",
"orderby": "description",
"project": self.project.id,
"dataset": self.dataset,
}
)

assert response.status_code == 200, response.content
data = response.data["data"]
meta = response.data["meta"]
assert len(data) == 1
assert data == [
{
"description": "foo",
"count()": 1,
},
]
assert meta["dataset"] == self.dataset


class OrganizationEventsEAPSpanEndpointTest(OrganizationEventsSpanIndexedEndpointTest):
is_eap = True
Expand Down

0 comments on commit a213dc8

Please sign in to comment.