Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.14 KB

k8s_applications.md

File metadata and controls

32 lines (21 loc) · 1.14 KB

libraries.RW.K8sApplications.k8s_applications

dynamic_parse_stacktraces

def dynamic_parse_stacktraces(
        logs: str,
        parser_name: str = "",
        parse_mode: str = "SPLIT",
        show_debug: bool = False) -> list[StackTraceData]

Allows for dynamic parsing of stacktraces based on the first log line if no parser name is provided, the first log line will be used to determine the parser to use based on a map lookup of parser types to their respective parsers

Arguments:

  • logs str - the log data to parse
  • parser_name str, optional - the name of the parser to lookup for use. Defaults to "".
  • parse_mode ParseMode, optional - how to modify the ingested logs, typically we want to split them on newlines. Defaults to ParseMode.SPLIT_INPUT.
  • show_debug bool, optional - Defaults to False.

Returns:

  • list[StackTraceData] - Returns a list of StackTraceData objects that contain the parsed stacktrace data to be leveraged by other functions