wu-sheng opened a new pull request, #72:
URL: https://github.com/apache/skywalking-horizon-ui/pull/72

   ## Why
   
   The per-layer Traces / Logs / Browser-errors / Pod-logs tabs answer "what's 
happening in *this* service?" — but operators often need to query **across 
layers**, or by trace-id / keyword / category with no layer in hand. This adds 
two cross-layer **inspect** power-tools modeled on the metrics-inspect surface: 
name a service (pick it, type it, or leave it blank), set conditions, get one 
result.
   
   ## What
   
   ### Trace inspect (`/operate/trace-inspect`)
   Cross-layer trace query. Source toggle **Native ↔ Zipkin**. Optional entity 
— **Pick** (layer→service→instance→endpoint), **Type** (service name + 
real/normal flag the BFF base64-encodes into the OAP id), or **blank** (all 
services). Native conditions (status / order / duration / tags / trace-id / 
time) + the duration-distribution scatter (click a dot → open the trace; drag → 
filter the list). Zipkin gets its own service / remote-service / span pickers + 
annotation query. Result + detail reuse the **same shared widgets** as the 
per-layer Traces tab.
   
   ### Log inspect (`/operate/log-inspect`)
   Cross-layer log query, full-width form, row-click opens a shared popout. 
Three sources:
   - **Raw** — OAP `queryLogs` (keywords / tags / trace-id / time).
   - **Browser** — the BROWSER layer's JS errors (category filter; popout shows 
the stack + source-map de-obfuscation, same flow as the per-layer Browser Logs 
tab).
   - **Kubernetes Pod logs** — on-demand container-log tail 
(layer→service→pod→container + window / keywords). Live, never persisted → **no 
cold-stage**; surfaces OAP's `errorReason` when tailing is disabled.
   
   ### Shared + cross-cutting
   - New shared widgets (`render/widgets/`): `TraceListPanel`, 
`TraceDetailCard`, `TraceDistribution`, `ZipkinTraceDetailCard`, 
`LogStreamPanel`, `LogDetailPopout`, `BrowserErrorPopout` — extracted from the 
per-layer views and reused by **both** the inspect tools and those tabs (the 
per-layer Traces / Logs / Browser tabs adopt them with no behavior/look change).
   - BFF: one `POST /api/explore/query` dispatches by kind+source; entity-id 
encoding in `util/entityId.ts`; `fetchNativeList` / `fetchLogs` / 
`fetchBrowserErrors` extracted from the per-layer routes; k8s reuses the 
existing pod-log routes.
   - RBAC: both tools gate on the new **`explore:read`** verb (granted to 
viewer / maintainer / operator), matching the route.
   - **Cold-stage** honored for native trace / raw logs / browser errors; 
correctly a no-op for on-demand k8s pod logs and zipkin.
   - i18n: every new string in en.json + all 7 locales.
   - Includes **19 fixes from an adversarial review** — notably a cascade-clear 
scope bug in the endpoint picker (switching service kept the prior endpoint id 
→ silent OAP mismatch), the runQuery reset + "Reading data…", and a 
distribution brush regression.
   
   ## Validation (public demo OAP)
   - Native + Zipkin traces return (zipkin: 5 traces from 
`frontend.sample-services`).
   - Raw logs (8 from `rating`), Browser errors (8 from `agent::ui`), 
Kubernetes Pod logs (containers `[songs, istio-proxy, istio-init]` + fetch OK 
on `songs`).
   - type-check / lint / build (ui + bff) / license / i18n:validate / 124 unit 
tests — all green.
   - The byte-exact OAP entity-id encoding verified against the demo.
   
   (This branch merges the already-merged template-fix #71 to stay current; the 
PR diff is the inspect feature only.)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to