Skip to main content
Version: 25.7.0

Tracing method interceptions (Hook Tracer)

Most of the security functionality in the Agent is implemented as interception of Application method calls. Agent methods doing that are called hooks. Agent has build in feature, Hook Tracer, which can be used to debug any issues related our hooks.

When enabled, the tracer emits debug events for each:

  • entry: hook invoked (arguments are included)
  • exit: hook returned (result is recorded)
  • exception: hook threw (throwable + full stack trace is recorded)

When to use?

Enable hook tracing when you need to understand:

  • which hook are being invoked
  • call ordering and concurrency across threads
  • argument/result values being passed
  • where a hook call throws (and with what stack trace)

Because this logs on every hook invocation, it is intended for troubleshooting only, not continuous production use.

How to enable?

  • enable the trace flag com.waratek.TraceHooksEnable=true
  • debug logging will be written (with some other debug messages) to the file configured by the following option: com.waratek.debug.log=<path/to/debug.log>
  • by default, all log categories are included, HOOK_TRACER is the category used by tracer