You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Manually set errors being overridden by HTTP Status code check #5307
Span errors set by the server seems to be overridden in method HttpServerDecorator.onResponseStatus(), which set the span error configuration base solely on the DD_HTTP_SERVER_ERROR_STATUSES property.
I believe considering the previous span error value in the setError logic should keep changes made to the span at the server.
if (!span.isError && !BlockingException.class.getName().equals(span.getTag("error.type"))) {
span.setError(SERVER_ERROR_STATUSES.get(status));
}
Or rollback to something like version 1.12.1 implementation:
if (!BlockingException.class.getName().equals(span.getTag("error.type")) && SERVER_ERROR_STATUSES.get(status)) {
span.setError(true);
}
Giving a bit more context to this issue, this behavior seems to have been introduced on this commit.
It could be considered worthy of review, because an user of Datadog could decide to set an error on a span programatically and observe no effect, which is unexpected IMHO.
Activity
RenanSFreitas commentedon Jun 6, 2023
Giving a bit more context to this issue, this behavior seems to have been introduced on this commit.
It could be considered worthy of review, because an user of Datadog could decide to set an error on a span programatically and observe no effect, which is unexpected IMHO.
amarziali commentedon Jun 13, 2023
Should be fixed by #5359 scheduled for next release