Skip to content
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

Fix cannot query zipkin traces with annotationQuery parameter in the JDBC related storage #11511

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/en/changes/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* Correct the file format and fix typos in the filenames for monitoring Kafka's e2e tests.
* Support extract timestamp from patterned datetime string in LAL.
* Support output key parameters in the booting logs.
* Fix cannot query zipkin traces with `annotationQuery` parameter in the JDBC related storage.

#### UI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public List<List<Span>> getTraces(final QueryRequest request, Duration duration)
}
}
}
sql.append(" group by ").append(ZipkinSpanRecord.TRACE_ID);
sql.append(" group by ").append(table).append(".").append(ZipkinSpanRecord.TRACE_ID);
sql.append(" order by min(").append(ZipkinSpanRecord.TIMESTAMP_MILLIS).append(") desc");
sql.append(" limit ").append(request.limit());
h2Client.executeQuery(sql.toString(), resultSet -> {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e-v2/cases/zipkin/zipkin-cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cases:
- query: curl http://${oap_host}:${oap_9412}/zipkin/api/v2/spans?serviceName=frontend
expected: expected/span-name.yml
# traces
- query: curl http://${oap_host}:${oap_9412}/zipkin/api/v2/traces?serviceName=frontend&remoteServiceName=backend&spanName=get&limit=1
- query: curl http://${oap_host}:${oap_9412}/zipkin/api/v2/traces?serviceName=frontend&remoteServiceName=backend&spanName=get&annotationQuery=wr&limit=1
expected: expected/traces.yml
# autocomplete
- query: curl http://${oap_host}:${oap_9412}/zipkin/api/v2/autocompleteValues?key=http.method
Expand Down
Loading