Repository navigation
Debug TAL rules through the DSL Debug API, page the debug API's record read, and debug the OTLP alias pairing - #14265
Merged
Merged
Conversation
wu-sheng
force-pushed
the
feat/tal-dsl-debugging
branch
from
November 25, 2026 01:04
1d12410 to
80c8d7c
Compare
wu-sheng
force-pushed
the
feat/tal-dsl-debugging
branch
2 times, most recently
from
November 25, 2026 05:39
e6c63f4 to
3d15492
Compare
wankai123
previously approved these changes
Nov 25, 2026
…d read, and debug the OTLP alias pairing
TAL rules are now debuggable as MAL, LAL and OAL rules are (`catalog=tal`). A record follows the object the analyzer
passes through the rule: one OTLP span, or one native segment listing every span with the rule's run on each
(statements, each `if` with the value of every operand it evaluated and its result, sources, metrics and aliases
written, the network-alias half asked for and whether it was sent, end state). `GET /runtime/tal/files` lists the
loaded TAL rules and `GET /runtime/tal/files/{name}` returns a file's content. The probes are compiled in when
injection is on, and read one plain flag per generated method when no session records the rule.
The debug read is paged for every DSL. Each record carries `captureTime` (`<millis>.<six-digit nanos>`), and
`GET /dsl-debugging/session/{id}` takes `capturedSince` and `pageSize` and returns `nextCapturedSince`, so a client
reads only what was captured since, from whichever node serves it. Each node's slice carries the process's
`instanceId`, a node at its `recordCap` no longer holds back the others, and `complete` says the capture is read
through. The other nodes stream their records one a message over the new `CollectDebugRecords` call, which replaces
`CollectDebugSamples` (a breaking change between nodes of different versions), and the admin channels between nodes
take `admin-server.gRPCMaxMessageSize` instead of gRPC's 4 MiB.
A new admin module, `trace-pairing-debugging`, captures on demand what the OAP node that owns a trace does with the
network-alias halves it receives: one capture per node, no sessions, each run a round under its own id, running
while it is read and released when it stops or idles out. It lists the peers matched to a server, and the peers and
servers whose halves left unmatched, with their latest trace ids, each entry naming the OAP nodes that hold it.
The runtime-rule `bundled` and `dump` routes refuse `tal` and `oal`, which no runtime-rule engine claims.
wu-sheng
force-pushed
the
feat/tal-dsl-debugging
branch
from
November 25, 2026 06:44
3d15492 to
1c7611b
Compare
wankai123
approved these changes
Nov 25, 2026
wu-sheng
added a commit
to apache/skywalking-horizon-ui
that referenced
this pull request
Nov 26, 2026
… pairing on a page of its own (#228) For SkyWalking 11.2 (apache/skywalking#14265): - The Live Debugger gains a TAL tab, laid out as an IDE's debugger: the captured frames, the rule file with each executed line's value, and the frame's variables. A read-only TAL rules page lists the loaded rules with a debug link beside each. - A new OTLP pairing page starts and stops OAP's shared pairing capture and lists what each round found in one paged list, by kind, with each round saved in History. - Every debugger tab reads only the records captured since its last read. - Pages that need 11.2 say so against an older OAP. Fixes to existing Live Debugger bugs: a cluster whose nodes share a node id read as one node; a capture stopped reading after its browser tab was hidden; a start or back to live over a saved capture kept showing it, or kept its address; a capture link was taken by every open tab; folds, selections and filters carried over to the next capture; a running capture was not saved while a saved one was on screen; MAL and LAL saved a capture under the rule picked next; a capture grown past the browser's storage emptied Capture history; against an OAP before 11.2, Resume of a stopped capture showed nothing, and a node that missed a read erased its records. Leaving the Live Debugger, or reloading it, while a capture runs now asks first. The trace Tree no longer scales a short trace up to fill its canvas, and its zoom controls follow the theme. The core e2e case gains a TAL debugger and an OTLP pairing spec against OAP bd8f2764db.
11 tasks done
wu-sheng
added a commit
to apache/skywalking-graalvm-distro
that referenced
this pull request
Nov 26, 2026
…-debugging module (#53) * Sync upstream to cb632100a5: TAL live debugging and the trace-pairing-debugging module The skywalking submodule moves 8 commits past 4bb9a61839 to cb632100a5. - TAL rules are live-debuggable (apache/skywalking#14265). Upstream's TAL compiler emits the debug probes when the codegen switch is on, which the precompiler turns on before every pass, so every pre-compiled TAL class carries its debug holder and probes; dsl-debugging runs TAL sessions and the /runtime/tal/* listing as it is. - Accept and wire the new trace-pairing-debugging admin module (poms, AcceptedModules, provider inventory, application.yml, regenerated config loader). - /runtime/rule/bundled refuses oal and tal with 400 invalid_catalog, as upstream now does for a catalog no runtime-rule engine claims; the parity test takes the served catalogs from upstream's MAL and LAL engines. - BanyanDBStorageConfig.Global loses compatibleServerApiVersions (apache/skywalking#14267); regenerate the loader. - otel-rules/oap.yaml and redis-instance.yaml change upstream (apache/skywalking#14264, #14258); OapTest feeds the new OTLP protocols and drop reasons, and the rule and source pins are refreshed. - Adopt upstream's dsl-debugging/tal-native and tal-otlp e2e cases; the dsl-debugging status fixture gains upstream's catalogs list; the e2e runner follows upstream's pin 8bb8499. - Docs and changelog describe TAL debugging and the new module. * Run upstream's cluster-paging e2e on two native replicas in a kind cluster Upstream runs dsl-debugging/cluster-paging on two ZooKeeper-coordinated containers. The distro runs it as dsl-debugging-cluster-paging on two native replicas on the Kubernetes coordinator, as otlp-traces-cluster does: upstream's span emitter sends to the first pod, and upstream's flow script reads through the second, with its two node names (oap1 / oap2) replaced by the pods' IPs, as the Kubernetes coordinator names the nodes; the wrapper fails when upstream renames them. It is the distro's only e2e of the admin-internal gRPC bus between nodes.
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.
Debug TAL rules through the DSL Debug API, page the debug API's record read for every DSL, and debug the OTLP network-alias pairing
TAL rules are now debuggable as MAL, LAL and OAL rules are: a session on
catalog=talrecords what a rule did to theobject the analyzer passes through it.
sw-native): one segment, listing every spanof it in wire order with its metadata, while the rule runs span by span;
first {}shows on span 0, a queuedbuild {}on the span that queued it. The segment's fields and the values the runner derives from it are therecord's
context.sourceLineis its line in the rule file, counted from the record'srule.dslFirstLine,the file line the rule's DSL starts at, so a client places every step on the file without matching texts; a node
that cannot read the file sends no
dslFirstLine, and its steps carrydslLine, the line within the DSL.ifoperands. Anifstep lists each operand of its condition that is not a literal, with the value itevaluated to, short-circuit kept, and the condition's result.
pairingoutput is the half it asked for (the caller's service and the peer itdialed, or the callee's service and rule) and what became of it (
sent,notSampled,rootSpan, ...);offeredBysays when the span sent an earlier rule's half instead. Whether halves match is not a rule's run, so the TAL debug
records no match; the pairing has its own debugging, below.
statementrecords every statement;blockkeeps the blocks, aborts and failures, and everyoutput, the data a run pushes forward: sources, metrics,
writeNetworkAlias, persist votes and pairing.continueOn: falseand the abort line, as LAL's is.GET /runtime/tal/fileslists the loaded rule files with their rules;GET /runtime/tal/files/{name}returns a file's content.injection on vs off with no session is within 2–4% (wide and concurrent cases within error), allocation unchanged.
The v1-v2 checker passes with probes on and a no-op recorder bound on every native rule (1,938,922 probe calls,
outputs identical).
Paging, for every DSL. A cluster read used to fetch every node's whole capture in one gRPC reply per node, every
second, and a node whose capture passed 4 MiB showed as unreachable. Now:
captureTime, when its node captured it, as<millis>.<six-digit nanos>: epochmilliseconds and the nanoseconds within them, compared milliseconds first, never adjusted;
GET /dsl-debugging/session/{id}takescapturedSinceandpageSize(1–1000, default 1000) and returnsnextCapturedSince: every record captured before it, on every node that answered, has been returned, and the nextread passes it back to get the records captured at or after it, on whichever node it lands, since the point travels
with the client. Records of one capture time are never split across pages;
instanceId, made once per OAP process by the debugging module, so a client behind a loadbalancer tells the processes apart where node ids (
0.0.0.0_11800on every node by default) do not; a node thatreached its
recordCapno longer holds back the records of nodes whose clocks run ahead of it;completesays thecapture is read through: every node holding the session answered and reached its cap, and the response holds the
rest. A node that does not answer, beside one that did, bounds the point at the serving node's clock;
CollectDebugRecords, one captured record a message, then oneCollectDebugRecordsSummary(status, capture size, the point the page holds every record before, the process'sinstanceId) that ends the stream, so only a single record has to fit a message. It replacesCollectDebugSamples,which returned a node's whole capture in one reply. Breaking: during a rolling upgrade a node reads no records
from a node of the other version (it shows as
unreachable); the changelog lists it as a breaking change. The adminbus is not on any data path, so this is acceptable;
admin-server.gRPCMaxMessageSize(50 MB by default), as the admin gRPCserver always did, instead of gRPC's 4 MiB default; a record larger than it comes as its size,
oversizedBytes,without its content;
pageSizeasks for, a response holds at most 100 MiB, shared evenly by the nodes, so the page size is whata read meets;
change ignores the parameters and returns the whole capture without
nextCapturedSince(verified on apre-change image).
Pairing debugging, a new admin module.
trace-pairing-debugging(SW_TRACE_PAIRING_DEBUGGING, on by default,requires
trace-analyzer) shows what the OAP node that owns a trace does with the halves it receives: which match,and the alias each match pushes.
POST /trace-pairing-debugging/startturns it on onevery node; it runs while it is read (
GET /trace-pairing-debugging/pairingsis a ping) and stops a minute after thelatest read, or on
POST /trace-pairing-debugging/stop; a stop, or that expiry, releases what it found, as a DSLsession's records go when it stops, so OAP keeps nothing between captures and a client keeps what it read. Each
capture from a start to its stop is a round with a
roundId: a start gives every node the round of the node thattook it, and a read sums only the nodes in its round, naming the others. Each entry names the OAP nodes that hold
it, by admin address.
GET /trace-pairing-debugging/statusprobes without a ping.server before it when a later match moved it, the latest callers, the alias address, the count and each match's
outcome:
registered,gateway,uncomposed,tooLong,noService), and the peers and the servers whose halvesleft without their pair (
expired,evicted,replaced), each with its latest five trace ids. A read merges thenodes' lists.
once, each call with the bus timeout, collected within one budget, so a slow node delays no other.
Docs:
dsl-debugging-tal.mdandtrace-pairing-debugging.md(new), the shareddsl-debugging.md(paging, the TALlisting, the record cap, which was documented as 32 and 1000/10000), the admin API index, the security page, the
configuration vocabulary, the TAL, native trace and trace analyzer pages.
Also: the runtime-rule
bundledanddumproutes refusetalandoal, which have no runtime-rule engine; theTAL holder registry treats two rules of one name in one file as not debuggable instead of picking one.
If this is non-trivial feature, paste the links/URLs to the design doc.
Update the documentation to include this new feature.
Tests(including UT, IT, E2E) are added to verify the new feature.
ifoperands, the recorder, the listing, paging on a node and across nodes(capped nodes, a node that does not answer,
complete), the pairing gate onSpanPairing, the pairing capture(its rounds, a read of the round most nodes hold, each entry's nodes, the release on a stop and on expiry, a
restart beginning empty) and its merge over nodes, and the fan-out with nine stalled peers and one prompt one.
DSL Debug API — TAL native: an emitter reports a typical segment (Entry, Local, Exits to a database and acache); statement and block sessions on
native-segment,native-virtual-databaseandnative-virtual-cache;a record names the file line its rule's DSL starts at.
DSL Debug API — TAL OTLP: two services' spans; the caller and callee halves a run sent, block records, thepairing capture matching the peer to its server, dialed by its caller, read as one round and released by a stop,
and the capture read five records a page while it captures.
DSL Debug API — paging across nodes: two OAPs in a ZooKeeper cluster, spans to one node only; a session readthrough the other node gets the first node's records over the stream, the two slices name distinct processes, and
a read paged five records at a time, switching nodes on every page, covers the capture with no record twice or
missing.
storage/mysql's config dump gains the new module.If it's UI related, attach the screenshots below. The Horizon Live Debugger's TAL tab, the TAL rule view and the
OTLP pairing page follow in a Horizon PR once this one is merged.
If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
Update the
CHANGESlog.GraalVM distro impact:
parity.
debugGateHolderfield,debugHolder()andsegmentDefNames(), and calls the staticTALDebugprobes,TALDebug.operandamong them for anifcondition's operands.SpanFilterListenerpublishes each loaded rule'sholder through
TalStaticBindingHook.TALClassGeneratorandSpanFilterListener, which the distro pins,change. The distro's TAL replacements (
TalDSL,TALConfigs) are unchanged in contract;TALConfigsonlychanges a comment.
trace-pairing-debugging: an admin module, of a kind the distro ships, so it needs accepting andwiring (
AcceptedModules,provider-inventory.properties,oap-graalvm-server/pom.xml, anapplication.ymlsection), or
SW_TRACE_PAIRING_DEBUGGING=-in the distro'sapplication.ymluntil then. It has no configfield, runs no generated code, and answers with Gson
JsonObjects it builds (no bound POJO); its admin-bus gRPCservice is built as dsl-debugging's is. It hooks a
PairingDebugGateontoSpanPairing, which the distro usesas-is.
trace-analyzerand reads the raw TAL files fromStaticRuleRegistry(catalogtal). The new Armeria handlersRuntimeTalRestHandlerandTracePairingDebuggingRestHandlerneed the reflection metadata the precompiler's handler scan generates.ApdexArgument,PercentileArgument,BucketedValues,DataTable,NetworkAliasMatchandGenAIModelMatchimplementToJson, andGenAIPricingConfig.Modelgains@ToString.bundled/dumprefusetalandoalwith400 invalid_catalog, so the distro'sBundledRuleCatalogHandlerand its parity test need the same refusal at the next sync.