Insight Scripts

Inject a diagnostic script with --insights

The repeatable global --insights <FILE> option loads a diagnostic script before the target program:

elide --insights trace.js app.js

The injected script runs in a dedicated environment with an insight object. Elide 1.5.0 exposes insight.id and insight.version, but does not expose the commonly expected insight.on or insight.off observer methods:

// trace.js
console.log(insight.id, insight.version);

The command-line option also accepts an Insight class. Class-based instrumentation and event subscriptions are not stable user-facing APIs in Elide 1.5.0.