-
Notifications
You must be signed in to change notification settings - Fork 19
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
Enable metric.context filter in Aim metrics search #685
Conversation
select from metrics
} | ||
|
||
func (eq JsonEq) Build(builder clause.Builder) { | ||
eq.Left.Build(builder) |
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.
i had to "override" these methods from the Gorm built-in so we could call Build
on the left-hand portion, instead of writing quoted
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.
…kml into json-context-query-aim
@fabiovincenzi I am not able to reproduce -- the filtering works correctly for me. Screenshots: |
{ | ||
name: "SearchMetricContext", | ||
request: request.SearchMetricsRequest{ | ||
Query: `metric.name == "TestMetric1" and metric.context.testkey == "testvalue"`, |
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.
Maybe using multiple metric.name
in the query to see if different metrics are filtered by context, something like:
Query: ((metric.name == "TestMetric1") or (metric.name == "TestMetric2")) and metric.context.testkey == "testvalue"
{ | ||
name: "NegativeSearchMetricContext", | ||
request: request.SearchMetricsRequest{ | ||
Query: `metric.name == "TestMetric1" and metric.context.testkey != "testvalue"`, |
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.
Same here
Ths PR adapts the query parser used by the Aim api to accept
metric.context
filtersFixes #361