-
Notifications
You must be signed in to change notification settings - Fork 467
feat(annotations): span annotation filters #7109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me
input SpanAnnotationFilterCondition { | ||
name: String | ||
source: AnnotationSource | ||
userIds: [GlobalID!] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious what the use-case for a list of users would be here. In general I like it, mainly curious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to filter for annotations from a particular user/ set of users. I think was your idea, it's on the ticket.
user_rowids = set( | ||
|
||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. this can be cached in a private variable via __post_init__
on the Filter object itself. FWIW, a list would be faster if the set is small.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably true wrt list.
include: Optional[SpanAnnotationFilterCondition] = UNSET | ||
exclude: Optional[SpanAnnotationFilterCondition] = UNSET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. maybe raise an exception via __post_init__
if there is a contradiction, e.g. when a name is both included and excluded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That strikes me as a situation we should just return an empty list.
resolves #6921