Probe behaviorConditions, expressions, and stack locals

Conditions, expressions, and stack locals

Use bounded read-only expressions and optional per-frame locals without executing application source.

Dot paths

Dot paths read fixed object, dictionary, or sequence segments such as user.tier or orders.0.total. Conditions support eq, ne, gt, gte, lt, and lte without type coercion.

Safe expressions

Conditions, snapshot watches, log placeholders, and metrics can use broker-compiled expressions. Supported operations include fixed reference reads, scalar literals, boolean operations, comparisons, and bounded arithmetic.

text
order.total > 100 and user.tier == "free"
items.0.price * quantity
not request.cached

Calls, assignment, constructors, imports, reflection, optional chaining, dynamic property expressions, and prototype segments are excluded. Types are strict. Division by zero, missing values, redacted references, unsafe integers, and non-finite values produce a structured evaluation error.

Log templates and levels

Log probes support debug, info, warn, and error. Placeholders can be simple dot paths or safe expressions:

text
order=${order.id} total=${order.subtotal + order.tax}

These are LiveProbe telemetry events. They do not enter the application's logging framework or invoke its logger.

Per-frame stack locals

Snapshot probes can set include_stack_locals=true and a stack_frame_limit from 1 to 8. Each selected frame uses the normal serializer, redaction, depth, property, array, and string limits. Frames without available debug metadata remain visible but may have no variables.

Capability checks

Agents advertise expression-ast-v1, frame-locals-v1, log-levels-v1, and safety-report-v1. The broker rejects a probe requiring a capability the active service replicas have not all reported.