-
Notifications
You must be signed in to change notification settings - Fork 550
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
TraceQL metrics tests #4802
base: main
Are you sure you want to change the base?
TraceQL metrics tests #4802
Conversation
a09acad
to
25c70d4
Compare
@@ -55,6 +55,14 @@ sendLoop: | |||
for _, query := range []string{ | |||
"{} | rate()", | |||
"{} | compare({status=error})", | |||
"{} | count_over_time()", |
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.
Can we include aggregations here?
{span.http.status_code = 500} | count_over_time() by (resource.service.name)
We should also test metrics with no matches
{span.foo = bar} | count_over_time() by (resource.service.name)
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.
+
Added
d337963
to
a7331cc
Compare
a7331cc
to
be455bc
Compare
} { | ||
t.Run(query, func(t *testing.T) { | ||
callQueryRange(t, tempo.Endpoint(tempoPort), query, debugMode) | ||
queryRangeRes := callQueryRange(t, tempo.Endpoint(tempoPort), query, debugMode) |
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 think this test should be rewritten to a deterministic table-driven test asserting that the data returned is correct:
- MakeThriftBatch generates random data; this should be changed to something we can control
- We should ensure we have traces in the backend and in recent data to test the different aggregation layers
- We should test a comprehensive list of metrics with and without aggregation and check the correctnes of the returned series
be455bc
to
97af8be
Compare
+ Rebase from latest main and fix after rebase |
What this PR does:
Improves coverage of TraceQL metrics
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]