Interface ScriptCallObserver


public interface ScriptCallObserver
Sees every call into a script's hooks (with the optional Starlark module): when it starts, and how it ended, with the interpreter steps it ran, about how many bytes of values it created, how long it took and why it failed. It is the place for tracing to make a span of each call, as a child of its exchange's. Register one with HttpProxyServerBootstrap.withScriptCallObserver(org.microproxy.ScriptCallObserver) (the --script option passes it on to the script) or the script's builder.

Calls come from the proxy's threads, at the same time for different exchanges (and for the two directions of a tunnel), so implementations must be thread-safe; they run inside the hook call, so they must be quick and must not throw. Without an observer the proxy calls nothing.