-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Fixing #1231. Adding order and status to trace query. #1255
Conversation
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.
Thanks for providing this. Have you saw #1240 ? The query protocol should follow that way, use emun to instead of int.
OK. Let me change Ints to enum and resend the pull request. |
Thanks and look forward to have this soon. |
Updated the pull request as requested. |
@ajanthan Your CI fails. |
searchRequestBuilder.addSort(SegmentDurationTable.START_TIME.getName(), SortOrder.DESC); | ||
switch (traceState) { | ||
case ERROR: | ||
mustQueryList.add(QueryBuilders.matchQuery(SegmentDurationTable.IS_ERROR.getName(), 1)); |
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.
1 -> BooleanUtils.TRUE
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.
Changed it.
mustQueryList.add(QueryBuilders.matchQuery(SegmentDurationTable.IS_ERROR.getName(), 1)); | ||
break; | ||
case SUCCESS: | ||
mustQueryList.add(QueryBuilders.matchQuery(SegmentDurationTable.IS_ERROR.getName(), 0)); |
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.
0 -> BooleanUtils.FALSE
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.
Changed it.
sql = sql + " and {" + paramIndex + "} = ?"; | ||
switch (traceState) { | ||
case ERROR: | ||
params.add(1); |
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.
ditto
params.add(1); | ||
break; | ||
case SUCCESS: | ||
params.add(0); |
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.
ditto
@@ -73,16 +75,30 @@ public TraceBrief loadTop(long startSecondTimeBucket, long endSecondTimeBucket, | |||
boolQueryBuilder.must().add(rangeQueryBuilder); | |||
} | |||
if (StringUtils.isNotEmpty(operationName)) { | |||
mustQueryList.add(QueryBuilders.matchPhraseQuery(SegmentDurationTable.SERVICE_NAME.getName(), operationName)); | |||
mustQueryList.add(QueryBuilders.matchQuery(SegmentDurationTable.SERVICE_NAME.getName(), operationName)); |
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 forgot why chose the method matchPhraseQuery before. Please ensure these two service names can be searched by the method matchQuery.
- org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()
- /dubbox-case/case/dubbox-rest
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.
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.
It is a mistake. Fixed it in the latest pull request.
@wu-sheng @peng-yongsheng I sent an updated pull request. Please review it. |
Please answer these questions before submitting pull request
Why submit this pull request?
Bug fix
[ *] New feature provided
Improve performance
Related issues
Add order and status options in trace query. #1231
Bug fix
Bug description.
How to fix?
New feature or improvement
Added status and order to trace query API and updated UI