Module brave
Package brave

Class ErrorParser


  • public class ErrorParser
    extends java.lang.Object
    This is a simplified type used for parsing errors. It only allows annotations or tags.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static ErrorParser NOOP
      Adds no tags to the span representing the operation in error.
    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorParser()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void annotate​(java.lang.Object span, java.lang.String value)
      void error​(java.lang.Throwable error, MutableSpan span)
      Used to parse errors on a subtype of SpanCustomizer
      void error​(java.lang.Throwable error, ScopedSpan scopedSpan)
      Used to parse errors on a subtype of ScopedSpan
      void error​(java.lang.Throwable error, SpanCustomizer customizer)
      Used to parse errors on a subtype of SpanCustomizer
      protected void error​(java.lang.Throwable error, java.lang.Object span)
      Override to change what data from the error are parsed into the span modeling it.
      protected void tag​(java.lang.Object span, java.lang.String key, java.lang.String message)
      • Methods inherited from class java.lang.Object

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

      • NOOP

        public static final ErrorParser NOOP
        Adds no tags to the span representing the operation in error.
    • Constructor Detail

      • ErrorParser

        public ErrorParser()
    • Method Detail

      • error

        public final void error​(java.lang.Throwable error,
                                ScopedSpan scopedSpan)
        Used to parse errors on a subtype of ScopedSpan
      • error

        public final void error​(java.lang.Throwable error,
                                SpanCustomizer customizer)
        Used to parse errors on a subtype of SpanCustomizer
      • error

        public final void error​(java.lang.Throwable error,
                                MutableSpan span)
        Used to parse errors on a subtype of SpanCustomizer
      • error

        protected void error​(java.lang.Throwable error,
                             java.lang.Object span)
        Override to change what data from the error are parsed into the span modeling it. By default, this tags "error" as the message or simple name of the type.