Package brave

Class ErrorParser


  • public class ErrorParser
    extends Tag<Throwable>
    Deprecated.
    Since 5.12 Use Tags#ERROR or defer to ZipkinSpanHandler
    • Field Detail

      • NOOP

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

      • ErrorParser

        public ErrorParser()
        Deprecated.
    • Method Detail

      • error

        protected void error​(Throwable error,
                             Object span)
        Deprecated.
        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.
      • key

        protected final String key​(Throwable input)
        Deprecated.
        Description copied from class: Tag
        Overrides the tag key based on the input
        Overrides:
        key in class Tag<Throwable>
      • parseValue

        protected final String parseValue​(Throwable input,
                                          TraceContext context)
        Deprecated.
        Description copied from class: Tag
        Override to change what data from the input are parsed into the span modeling it. Any exceptions will be logged and ignored.

        Note: Overrides of Tags.ERROR must return a valid value when {@param context} is null, even if that value is "" (empty string). Otherwise, error spans will not be marked as such.

        Specified by:
        parseValue in class Tag<Throwable>
        Returns:
        The result to add as a span tag. null means no tag will be added. Note: empty string is a valid tag value!