feat(traces): drill from General-service metric charts to native traces - #90
Merged
Conversation
Click a datapoint on a drill-capable General service line widget — Avg Response Time, Response Time Percentile, Error Rate, Apdex, Success Rate, MQ consume latency, across Service / Instance / Endpoint — to open the native Traces list in a new browser tab, pre-filtered to that service (and the selected instance / endpoint) and centered on the clicked bucket's window. Latency widgets open slowest-first with a minimum trace duration of the clicked value; error / success-rate widgets open with the trace status set to Error. A "traces" flag in the widget header marks the eligible charts. Opt-in per line widget via a new optional `traceDrill` template field (mode: latency | error), authored in the widget editor next to the MQE and enabled only on a layer whose native Traces component is on. The bundled General service layer stamps the ten eligible widgets. Also: - fix: the dashboard "Reading data…" gate hung on Back-from-Traces — a warm vue-query cache repopulates synchronously on remount with no change event, so the freshness watch now runs immediately at mount. - fix: the drill popover no longer stacks under the chart hover tooltip (the clicked chart's tooltip is suppressed while its popover is pinned). - remove: the deprecated `layerScope` widget option. It emitted OAP's `scope: All` entity (deprecated in the query-protocol since 9.4.0) and no bundled dashboard used it; legacy stored dashboards degrade to normal service scope.
…urce The drill is config-driven and not bound to any specific layer. The only environmental gate is whether the layer's Traces component is activated — key on `caps.traces` (renderer) / `components.traces` (editor) instead of `traces.source`, which defaulted to `native` when the component was absent and would have offered the drill on a layer with no Traces tab.
The drill filter (minTraceDuration / traceState) is only consumed by the native trace view; a Zipkin-only layer's /trace route renders the Zipkin view, which ignores it. Gate on the Traces component being on AND the source being native/both, so a Zipkin-only layer never offers a drill that would open an unfiltered list.
wankai123
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Requested in discussion #13934: when a service / API's latency or error rate looks abnormal on a trend chart, operators want to click the spike and land on the matching traces instead of hand-building a trace filter. Only latency and success/error metrics have a natural trace criterion, so the drill is scoped to those.
What
queryOrder=BY_DURATION) withminTraceDuration= the clicked value.traceState=ERROR.traceDrill: { mode: 'latency' | 'error' }field onDashboardWidget, authored in the widget editor next to the MQE and enabled only when the layer's native Traces component is on (disabled with a notice otherwise). The bundled General service template stamps the ten eligible widgets; it also works on custom General-service dashboards.layerScopewidget option. It emitted OAP'sscope: Allentity (deprecated in the query-protocol since 9.4.0) and no bundled dashboard used it; legacy stored dashboards degrade to normal service scope.No backend / query-protocol change —
minTraceDuration+traceStatealready exist on the trace query.Validation
type-check,build-ui,build-bff,license:check(0 invalid),lint,test:unit(BFF 172, UI 133) all green.ensource + zh-CN / es / pt / ja / ko / de / fr); completeness verified.serviceId+name composite), and the second-precision centered window.