Package brave
Class ErrorParser
java.lang.Object
brave.ErrorParser
public class ErrorParser extends 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
Modifier and Type Method Description protected void
annotate(Object span, String value)
Same behaviour asSpanCustomizer.annotate(String)
void
error(Throwable error, MutableSpan span)
Used to parse errors on a subtype of MutableSpanvoid
error(Throwable error, ScopedSpan scopedSpan)
Used to parse errors on a subtype of ScopedSpanvoid
error(Throwable error, SpanCustomizer customizer)
Used to parse errors on a subtype of SpanCustomizerprotected void
error(Throwable error, Object span)
Override to change what data from the error are parsed into the span modeling it.protected void
tag(Object span, String key, String message)
Same behaviour asSpanCustomizer.tag(String, String)
-
Field Details
-
NOOP
Adds no tags to the span representing the operation in error.
-
-
Constructor Details
-
ErrorParser
public ErrorParser()
-
-
Method Details
-
error
Used to parse errors on a subtype of ScopedSpan -
error
Used to parse errors on a subtype of SpanCustomizer -
error
Used to parse errors on a subtype of MutableSpan -
error
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. -
annotate
Same behaviour asSpanCustomizer.annotate(String)
-
tag
Same behaviour asSpanCustomizer.tag(String, String)
-