⚡ Comparison of Probe Capabilities
📸 1. Snapshot Probes
Snapshot probes capture variables and call stack frames when execution reaches a line, without stopping the application in a debugger. Capture adds work to your application.How to Configure Snapshots
- Hit Limit (Default
1): Limits how many snapshots are taken before the probe automatically uninstalls itself in-process. snapshots default to1to avoid heap copies. - Watch Expressions: Enter custom evaluations (e.g.
user.profile.isAdmin) to track deep nested values without serializing entire root objects. - Condition: Filter the execution. Only captures when a boolean evaluation is met (e.g.,
cart.total > 5000).
📝 2. Dynamic Log Probes
Dynamic Log probes let you write log lines with interpolated variables (${expression}) and inject them into stdout/stderr without redeploying.
message Formatting Syntax
Wrap runtime variables in standard string interpolation templates:Supported Log Levels
INFO- Standard operational traces.WARN- Unexpected but non-fatal conditions.ERROR- Critical failures and exceptions.DEBUG- High-detail engineering diagnostics.
🔢 3. Counter Probes
Counter probes are extremely lightweight. Instead of collecting strings or variable trees, they increment a running atomic counter in-process and stream the frequency of execution back to your editor.Key Use Cases
- Measuring branch execution (e.g., how often is the
elseblock running versus theifblock?). - Tracking cache misses inside database queries.
- Measuring high-frequency loops (perfectly safe for paths executing millions of times per second).
📈 4. Custom Metrics Probes
Metric probes evaluate any mathematical or numerical expression and export the float result directly to your editor or metric dashboard.Example Expressions
Conditionals & Hit Limits
Because metrics and counters generate minimal network payloads, their default hit limits can be scaled much higher (up to10,000 hits) than Snapshots to build high-fidelity frequency charts.