• Andy Wilkinson's avatar
    Add support for plain text thread dumps to the threaddump endpoint · c5cae282
    Andy Wilkinson authored
    When a request that accepts text/plain is received, the threaddump
    endpoint will now return a thread dump in plain text. The format of
    this text is modelled after the output produced by JVisualVM when
    connecting to a remote process over JMX. Note that this output does
    not include all of the information in, for example, JStack's output
    as it is not available via Java 8's ThreadInfo API.
    
    Rather than the custom formatting logic, using ThreadInfo's toString()
    method was considered but its output is documented as being undefined
    and implementation specific. The implementation used while developing
    this feature produced output that did not match that of JStack or
    JVisualVM and truncated stack traces quite considerably.
    
    At the time of writing the format produced by the endpoint could be
    consumed by both Thread Dump Analyzer [1] and https://fastthread.io.
    
    Closes gh-2339
    
    [1] https://github.com/irockel/tda
    c5cae282
threaddump.adoc 1.16 KB