Skip to content

Commit

Permalink
Fix cannot query zipkin traces with annotationQuery parameter in th…
Browse files Browse the repository at this point in the history
…e JDBC related storage (#11511)
  • Loading branch information
mrproliu committed Nov 8, 2023
1 parent f8c6855 commit 7b01a4a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
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

0 comments on commit 7b01a4a

Please sign in to comment.