Skip to content

feat(snuba): Add AnyAttributeFilter for searching across all attributes#172

Open
phacops wants to merge 1 commit intomainfrom
feat/add-any-attribute-filter
Open

feat(snuba): Add AnyAttributeFilter for searching across all attributes#172
phacops wants to merge 1 commit intomainfrom
feat/add-any-attribute-filter

Conversation

@phacops
Copy link
Collaborator

@phacops phacops commented Jan 30, 2026

Add a new AnyAttributeFilter message type to enable searching for a value across ALL attributes in EAP RPC endpoints, rather than requiring a specific attribute key.

This is useful for broad searches where the user doesn't know which attribute contains the value they're looking for (e.g., searching for "error" across all string attributes).

Design decisions:

  • New message type instead of modifying ComparisonFilter: Clearer semantics and allows restricting to sensible operations only
  • Restricted operations: Excludes comparison ops (LESS_THAN, GREATER_THAN, etc.) that don't make sense across heterogeneous attribute types
  • Optional attribute_types field: Allows callers to restrict which types to search (defaults to string-type attributes)
  • Backward compatible: Adding field 6 to the oneof doesn't break existing clients

Example usage:

// Find items where any attribute contains "error"
TraceItemFilter {
  any_attribute_filter: AnyAttributeFilter {
    op: OP_LIKE
    value: AttributeValue { val_str: "%error%" }
    ignore_case: true
  }
}

Add a new AnyAttributeFilter message type to enable searching for a
value across ALL attributes in EAP RPC endpoints, rather than requiring
a specific attribute key. This is useful for broad searches where the
user doesn't know which attribute contains the value they're looking for.

The filter includes a restricted set of operations (EQUALS, NOT_EQUALS,
LIKE, NOT_LIKE, IN, NOT_IN) that make sense for all-attribute search,
excluding comparison ops like LESS_THAN that don't work across
heterogeneous attribute types.

Co-Authored-By: Claude <noreply@anthropic.com>
@phacops phacops requested a review from a team as a code owner January 30, 2026 18:09
@github-actions
Copy link

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedJan 30, 2026, 6:09 PM

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.

1 participant