Add a log field.

This commit is contained in:
wusheng 2017-02-22 23:38:32 +08:00
parent b00cadb9e6
commit 3c44572d99
1 changed files with 1 additions and 0 deletions

View File

@ -259,6 +259,7 @@ public class Span implements ISerializable<SpanMessage> {
*/
public Span log(Throwable t) {
Map<String, String> exceptionFields = new HashMap<String, String>();
exceptionFields.put("event", "error");
exceptionFields.put("error.kind", t.getClass().getName());
exceptionFields.put("message", t.getMessage());
exceptionFields.put("stack", ThrowableTransformer.INSTANCE.convert2String(t, 4000));