Skip to main content

Active Transaction

A transaction in progress is called "active transaction." A stack that has been regularly dumped by an active transaction is called active stack.

Note

The WhaTap agent dumps active stacks for active transactions every 10 seconds (optional) and sends them to the server. active_stack_second=10

Collecting the compact active stacks

Because the active stack regularly performs thread dumps, it can add lots of overheads to the agent if implemented incorrectly. WhaTap has various options to collect active stacks while minimizing the agent load.

Tip

In Sitemap > Thread List/Dump, from the thread list, the overhead can be determined by checking the CPU time of the WhaTap-ActiveStackDump thread.

Optimized data collection

  • Dump the stack only for the thread that is performing transactions.

  • You can adjust the active stack dump time interval.

    active_stack_second=10

  • It is limited to the maximum line of the active stack. It collects 50 lines from the top line by default.

    trace_active_callstack_depth=50

  • Each hashed line of the active stack is collected. Text is collected only once.

  • The maximum number of active stacks collected at a time is limited.

    active_stack_count=100

Active Stack for Background Threads

Basically, the active stack means the stack of the thread in which transactions are being processed. You may need to analyze the stack for some background threads as well. At this time, the ** for the background thread can be obtained using the option. It is available in the Java agent 1.6.2 or later.

  • If the value of async_stack_enabled is set to true, the function is enabled.

    whatap.conf
    async_stack_enabled=false
  • The stack dump interval depends on the foreground active stack setting.

    whatap.conf
    active_stack_second=10
  • When setting the target thread name, use * to specify the string pattern.

    whatap.conf
    async_thread_match=http*,abc*

    It identifies the stack dump target with the thread name. You can specify multiple matches using comma (,) as the delimiter.

  • When the Top method of the stack is a class or method registered in async_thread_parking, it determines that the thread has been parked and does not generate a dump.

    whatap.conf
    async_thread_parking_class=sun.misc.Unsafe
    async_thread_parking_method=park

References