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 ErrorParserNOOPAdds no tags to the span representing the operation in error. -
Constructor Summary
Constructors Constructor Description ErrorParser() -
Method Summary
Modifier and Type Method Description protected voidannotate(Object span, String value)Same behaviour asSpanCustomizer.annotate(String)voiderror(Throwable error, MutableSpan span)Used to parse errors on a subtype of SpanCustomizervoiderror(Throwable error, ScopedSpan scopedSpan)Used to parse errors on a subtype of ScopedSpanvoiderror(Throwable error, SpanCustomizer customizer)Used to parse errors on a subtype of SpanCustomizerprotected voiderror(Throwable error, Object span)Override to change what data from the error are parsed into the span modeling it.protected voidtag(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 SpanCustomizer -
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)
-