mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-05-07 15:16:54 +02:00
Add exception class to failed span of AdvancedHttpClient
This commit is contained in:
@@ -201,7 +201,8 @@ public class DefaultAdvancedHttpClient extends AdvancedHttpClient
|
||||
}
|
||||
return response;
|
||||
} catch (IOException ex) {
|
||||
span.label("exception", ex.getMessage());
|
||||
span.label("exception", ex.getClass().getName());
|
||||
span.label("message", ex.getMessage());
|
||||
span.failed();
|
||||
throw ex;
|
||||
}
|
||||
|
||||
@@ -302,7 +302,8 @@ public class DefaultAdvancedHttpClientTest
|
||||
verify(tracer).span("failures");
|
||||
verify(span).label("url", "http://failing.host");
|
||||
verify(span).label("method", "DELETE");
|
||||
verify(span).label("exception", "failed");
|
||||
verify(span).label("exception", IOException.class.getName());
|
||||
verify(span).label("message", "failed");
|
||||
verify(span).failed();
|
||||
verify(span).close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user