Interface ScriptTraceEnhancer.ScriptTraceContext

  • All Known Implementing Classes:
    DefaultScriptTrace
    Enclosing interface:
    ScriptTraceEnhancer

    public static interface ScriptTraceEnhancer.ScriptTraceContext
    Allows enhancing of ScriptTraces with additional meta information.
    Author:
    Arthur Hupka-Merle
    • Method Detail

      • addTraceTag

        ScriptTraceEnhancer.ScriptTraceContext addTraceTag​(String key,
                                                           String value)
        Adds a tracing tag to this script trace. Tags are used to identify the origin of a script invocation and can also be used to classify script invocations e.g. to distinguish different use-cases etc.
      • getVariableContainer

        default VariableContainer getVariableContainer()
        Returns:
        the variable container which shall be used to extract trace tags from
      • getRequest

        ScriptEngineRequest getRequest()
        Returns:
        the processed request which lead to this script trace.
      • getException

        Throwable getException()
        Returns:
        the exception (if the request ended in an error). Or null if the request was successful.