in aws-xray-agent/src/main/java/com/amazonaws/xray/agent/runtime/handlers/downstream/AWSV2Handler.java [179:185]
private void setRemoteForException(Subsegment subsegment, Throwable exception) {
subsegment.getCause().getExceptions().forEach((e) -> {
if (e.getThrowable() == exception) {
e.setRemote(true);
}
});
}