Class StackTraceProvider


  • public class StackTraceProvider
    extends java.lang.Object
    Utility class for stack trace capture with filtering and truncation to reduce memory consumption. Filters out framework classes and limits to a maximum number of frames.
    Since:
    3.6.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void configure​(java.lang.String prefixes)
      Configure framework prefixes to filter from stack traces.
      static void configure​(java.lang.String prefixes, int maxFrameCount)
      Configure framework prefixes and maximum frame count for stack traces.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StackTraceProvider

        public StackTraceProvider()
    • Method Detail

      • configure

        public static void configure​(java.lang.String prefixes)
        Configure framework prefixes to filter from stack traces. When specified, this REPLACES the default prefixes (does not add to them). To disable all filtering, pass an empty string. To use defaults, pass null.
        Parameters:
        prefixes - comma-separated list of package prefixes to filter, or empty to disable filtering
      • configure

        public static void configure​(java.lang.String prefixes,
                                     int maxFrameCount)
        Configure framework prefixes and maximum frame count for stack traces.
        Parameters:
        prefixes - comma-separated list of package prefixes to filter, or empty to disable filtering, or null for defaults
        maxFrameCount - maximum number of stack trace frames to capture; 0 or negative disables stack trace capture