in src/main/java/com/spotify/github/opencensus/OpenCensusSpan.java [45:56]
public Span failure(final Throwable t) {
if (t instanceof RequestNotOkException) {
RequestNotOkException ex = (RequestNotOkException) t;
span.putAttribute("http.status_code", AttributeValue.longAttributeValue(ex.statusCode()));
span.putAttribute("message", AttributeValue.stringAttributeValue(ex.getRawMessage()));
if (ex.statusCode() - INTERNAL_SERVER_ERROR >= 0) {
span.putAttribute("error", AttributeValue.booleanAttributeValue(true));
}
}
span.setStatus(Status.UNKNOWN);
return this;
}