Skip to content

feat(cross-item-queries): Add trace item filters with type in trace item table and time series endpoints#136

Merged
davidtsuk merged 6 commits into
mainfrom
david/cross-item-queries
Aug 12, 2025
Merged

feat(cross-item-queries): Add trace item filters with type in trace item table and time series endpoints#136
davidtsuk merged 6 commits into
mainfrom
david/cross-item-queries

Conversation

@davidtsuk
Copy link
Copy Markdown
Contributor

Adding trace item filters with type for cross item query support

@davidtsuk davidtsuk requested a review from a team as a code owner August 4, 2025 18:52
@github-actions
Copy link
Copy Markdown

ghost commented Aug 4, 2025

The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedAug 12, 2025, 6:16 PM

// one for prod, one for dev etc
repeated AttributeKey group_by = 5;

repeated TraceItemFilterWithType trace_filters = 7;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused how this is supposed to work. can you include an example query for how this endpoint is supposed to function now that there are two types of filters here?

Copy link
Copy Markdown
Contributor Author

@davidtsuk davidtsuk Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works exactly the same way GetTraces works, but I can add a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see an example (aka a test) such that as a product developer I can see what the intended usage is. A few things I'm confused about:

  1. will trace_filters replace filter? seems like trace_filters are a superset of filter functionality
  2. as a user of this interface I see "enables cross-item queries` that doesn't really mean anything to me, what does it mean for me the user?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a test.

  1. trace_filters will not replace filter as they are responsible for different filters. First, trace_filters will filter out traces by only getting traces that contain items matching the conditions. Then, the regular trace item table or timeseries query will run with the additional condition that only those traces returned by the first query will be considered. In other words, trace_filters are applied on a trace level to filter out traces and filter is applied on the actual items in the traces.
  2. Good point, I have updated the description to explain what the functionality actually is

@davidtsuk davidtsuk merged commit 74b193d into main Aug 12, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants