Skip to content

Support TraceQL and Tempo API for SkyWalking native trace query.#13770

Merged
wu-sheng merged 12 commits intomasterfrom
sw-traceql
Mar 31, 2026
Merged

Support TraceQL and Tempo API for SkyWalking native trace query.#13770
wu-sheng merged 12 commits intomasterfrom
sw-traceql

Conversation

@wankai123
Copy link
Copy Markdown
Member

  • If this is non-trivial feature, paste the links/URLs to the design doc.

  • [ X] Update the documentation to include this new feature.

  • Tests(including UT, IT, E2E) are added to verify the new feature.

  • If it's UI related, attach the screenshots below.

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.

  • Update the CHANGES log.

b7059e617714f9b69a7c7bd9fea12647

@wankai123 wankai123 added this to the 10.4.0 milestone Mar 30, 2026
@wankai123 wankai123 requested review from Copilot and wu-sheng March 30, 2026 06:02
@wankai123 wankai123 added backend OAP backend related. feature New feature labels Mar 30, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Grafana Tempo-compatible TraceQL REST API support for querying both Zipkin and SkyWalking-native traces, including response conversion to OTLP formats and new E2E coverage for the SkyWalking datasource.

Changes:

  • Implement SkyWalking-native TraceQL handlers (search, tag autocomplete, trace-by-id) and OTLP conversion utilities.
  • Refactor Zipkin query handler logic into a reusable ZipkinQueryService and enhance trace list responses with configurable allowed tag keys.
  • Add SkyWalking TraceQL E2E scenario and update docs/config vocabulary and changelog for the new capability.

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
test/e2e-v2/cases/traceql/zipkin/expected/tag-values-status.yml Updates Zipkin status tag-values expectations (now only error).
test/e2e-v2/cases/traceql/skywalking/traceql-cases.yaml New SkyWalking TraceQL API test cases (buildinfo, tags, search, trace-by-id JSON/Protobuf).
test/e2e-v2/cases/traceql/skywalking/expected/trace-by-id-protobuf-header.yml New expected header assertion for Protobuf trace-by-id.
test/e2e-v2/cases/traceql/skywalking/expected/trace-by-id-json.yml New expected JSON structure for SkyWalking trace-by-id (OTLP JSON model).
test/e2e-v2/cases/traceql/skywalking/expected/tag-values-status.yml New expected status values (ok, error) for SkyWalking datasource.
test/e2e-v2/cases/traceql/skywalking/expected/tag-values-service.yml New expected service tag-values output for SkyWalking datasource.
test/e2e-v2/cases/traceql/skywalking/expected/tag-values-http-method.yml New expected http.method tag-values output for SkyWalking datasource.
test/e2e-v2/cases/traceql/skywalking/expected/search-traces-complex.yml New expected response shape for complex SkyWalking TraceQL search.
test/e2e-v2/cases/traceql/skywalking/expected/search-traces-by-service.yml New expected response shape for SkyWalking search filtered by service.
test/e2e-v2/cases/traceql/skywalking/expected/search-traces-by-duration.yml New expected response shape for SkyWalking search filtered by duration.
test/e2e-v2/cases/traceql/skywalking/expected/search-tags-v2.yml New expected v2 tag scopes/tags for SkyWalking.
test/e2e-v2/cases/traceql/skywalking/expected/search-tags-v1.yml New expected v1 tag list for SkyWalking.
test/e2e-v2/cases/traceql/skywalking/expected/buildinfo.yml New expected buildinfo response for SkyWalking TraceQL endpoint.
test/e2e-v2/cases/traceql/skywalking/e2e.yaml New E2E config to run TraceQL tests against SkyWalking datasource.
test/e2e-v2/cases/traceql/skywalking/docker-compose.yml New compose stack enabling TraceQL with SkyWalking datasource and BanyanDB storage.
oap-server/server-starter/src/main/resources/application.yml Adds TraceQL lookback and configurable “trace list result tags” settings.
oap-server/server-query-plugin/zipkin-query-plugin/src/main/java/org/apache/skywalking/oap/query/zipkin/handler/ZipkinQueryHandler.java Refactors handler to delegate query logic to ZipkinQueryService.
oap-server/server-query-plugin/zipkin-query-plugin/src/main/java/org/apache/skywalking/oap/query/zipkin/ZipkinQueryService.java New shared Zipkin query service (trace v1/v2 + attached events logic).
oap-server/server-query-plugin/zipkin-query-plugin/src/main/java/org/apache/skywalking/oap/query/zipkin/ZipkinQueryProvider.java Stops registering handler as a module service; constructs handler directly for HTTP server.
oap-server/server-query-plugin/zipkin-query-plugin/src/main/java/org/apache/skywalking/oap/query/zipkin/ZipkinQueryModule.java Removes exported services list (no longer exposes ZipkinQueryHandler as service).
oap-server/server-query-plugin/traceql-plugin/src/main/java/org/apache/skywalking/oap/query/traceql/rt/TraceQLQueryVisitor.java Extends attribute handling (service/instance mapping) via switch-based routing.
oap-server/server-query-plugin/traceql-plugin/src/main/java/org/apache/skywalking/oap/query/traceql/rt/TraceQLQueryParams.java Adds serviceInstance filter field.
oap-server/server-query-plugin/traceql-plugin/src/main/java/org/apache/skywalking/oap/query/traceql/handler/ZipkinTraceQLApiHandler.java Updates Zipkin TraceQL handler to use ZipkinQueryService, lookback config, and allowed-tag filtering.
oap-server/server-query-plugin/traceql-plugin/src/main/java/org/apache/skywalking/oap/query/traceql/handler/TraceQLApiHandler.java Adds shared helpers/constants (duration builder, protobuf response builder, tag constants).
oap-server/server-query-plugin/traceql-plugin/src/main/java/org/apache/skywalking/oap/query/traceql/handler/SkyWalkingTraceQLApiHandler.java Implements SkyWalking-native TraceQL endpoints (search/tags/tag-values/trace-by-id).
oap-server/server-query-plugin/traceql-plugin/src/main/java/org/apache/skywalking/oap/query/traceql/entity/SearchResponse.java Ensures JSON omits null fields for attribute values.
oap-server/server-query-plugin/traceql-plugin/src/main/java/org/apache/skywalking/oap/query/traceql/converter/ZipkinOTLPConverter.java Adds allowed-tag filtering + consistent attribute key padding to avoid Grafana DataFrame panic.
oap-server/server-query-plugin/traceql-plugin/src/main/java/org/apache/skywalking/oap/query/traceql/converter/SkyWalkingOTLPConverter.java New converter for SkyWalking trace/query results to OTLP + traceId hex-encoding helpers.
oap-server/server-query-plugin/traceql-plugin/src/main/java/org/apache/skywalking/oap/query/traceql/converter/OTLPConverter.java New shared converter for Protobuf→JSON OTLP model + hex helpers.
oap-server/server-query-plugin/traceql-plugin/src/main/java/org/apache/skywalking/oap/query/traceql/TraceQLProvider.java Passes TraceQL config into datasource handlers; adjusts server lifecycle flow.
oap-server/server-query-plugin/traceql-plugin/src/main/java/org/apache/skywalking/oap/query/traceql/TraceQLConfig.java Adds TraceQL lookback + configurable “trace list result tags” config fields/defaults.
oap-server/server-query-plugin/status-query-plugin/src/main/java/org/apache/skywalking/oap/query/debug/DebuggingHTTPHandler.java Updates method names after Zipkin handler refactor.
docs/en/setup/backend/configuration-vocabulary.md Documents TraceQL module settings (lookback + trace list result tags, etc.).
docs/en/changes/changes.md Updates changelog entry to include SkyWalking-native trace querying.
docs/en/api/traceql-service.md Extends TraceQL service docs for SkyWalking-native support and conversion details.
.github/workflows/skywalking.yaml Adds CI job entry for SkyWalking TraceQL E2E case.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wu-sheng wu-sheng merged commit c6a07a2 into master Mar 31, 2026
209 of 210 checks passed
@wu-sheng wu-sheng deleted the sw-traceql branch March 31, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related. feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants