Skip to content

live-debug: show the LAL drop reason#92

Merged
wu-sheng merged 2 commits into
mainfrom
feat/live-debug-drop-reason
Jul 3, 2026
Merged

live-debug: show the LAL drop reason#92
wu-sheng merged 2 commits into
mainfrom
feat/live-debug-drop-reason

Conversation

@wu-sheng

@wu-sheng wu-sheng commented Jul 3, 2026

Copy link
Copy Markdown
Member

What

Surface the new OAP drop reason in the live debugger's LAL view. When a LAL rule stops a log at a parse step — a json {} / yaml {} parse failure, a text { regexp } non-match, or a non-log-body input — the OAP dsl-debugging session response now carries a per-sample reason explaining why. Previously the UI could only show continueOn = false (that a step stopped, never why).

Pairs with the OAP change apache/skywalking#13937.

Changes

  • api-client — add optional SessionSample.reason.
  • LalCell — render the reason under the existing abort marker when present (warn-accented, monospace, wraps).
  • LalCellPopout — show the full reason (wrapped) in the cell detail popout. The dense matrix cell truncates long values (like the JSON body); the popout is where a cell is read in full, so the reason belongs there too.
  • DebugLal — pass the sample's reason to the matrix cell, and thread it through openCellPopout to the detail popout.
  • i18n — add the drop reason label (en + zh-CN; other locales fall back to en).

Backward compatibility

reason is optional. An OAP version that doesn't send it (older dev builds, or MAL/OAL samples which don't populate it) renders exactly as before — the reason block is v-if on the reason, so it only appears when present. No change to any existing sample display. The BFF forwards the session response raw, so reason rides through with no BFF change.

Validation

type-check, lint, license:check clean; apps/ui unit tests 133 passed. Previewed in the local dev stack against the demo OAP with a mocked reason on continueOn:false ALS samples (the paired OAP change isn't merged yet): the reason renders in the matrix cell and, now, fully in the detail popout.

The OAP dsl-debugging session response now carries an optional per-sample
'reason' explaining WHY a LAL step stopped the pipeline (parse failure,
non-matching regexp, non-log-body input). Surface it in the live debugger:

- api-client: add optional SessionSample.reason.
- LalCell: render the reason under the abort marker when present.
- DebugLal: pass the sample's reason to the cell.
- i18n: add the 'drop reason' label (en + zh-CN).

Backward compatible: reason is optional, so an OAP version that does not
send it (older dev builds) renders exactly as before — the block only
appears when a reason is present.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@wu-sheng wu-sheng added this to the 1.0.0 milestone Jul 3, 2026
@wu-sheng wu-sheng added the enhancement New feature or request label Jul 3, 2026
@wu-sheng
wu-sheng requested a review from Copilot July 3, 2026 05:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds support in Horizon UI’s live debugger (LAL view) to display the OAP-provided per-sample “drop reason” explaining why a pipeline step stopped (e.g., parse failure / regexp non-match / input-type mismatch). This improves diagnosability beyond the existing “stopped” signal.

Changes:

  • Extend the api-client SessionSample type with optional reason?: string for backward-compatible consumption.
  • Render an additional “drop reason” block in LalCell when reason is present, and plumb the field from DebugLal into the cell.
  • Add i18n strings for the new label (en + zh-CN; other locales rely on fallback-to-en behavior).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/api-client/src/dsl-debugging.ts Adds optional SessionSample.reason with clear documentation and backward-compat notes.
apps/ui/src/i18n/locales/en.json Adds the drop reason label in the source (English) catalog.
apps/ui/src/i18n/locales/zh-CN.json Adds the drop reason label translation for zh-CN.
apps/ui/src/features/operate/live-debug/LalCell.vue Displays the drop reason under the cell content when provided; styling matches existing warn/accent patterns.
apps/ui/src/features/operate/live-debug/DebugLal.vue Passes sample.reason down into LalCell from the per-cell sample.

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

The reason rendered in the dense matrix cell — where it truncates like any
long value — but not in the full-cell popout, which is where you go to read
a cell in full. Add a `reason` prop + wrapped block to LalCellPopout and
thread the sample's reason through openCellPopout so the detail view shows
the complete explanation.
@wu-sheng
wu-sheng merged commit cb479c0 into main Jul 3, 2026
8 checks passed
@wu-sheng
wu-sheng deleted the feat/live-debug-drop-reason branch July 3, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants