rajeshkumarchandolu commented on code in PR #12145:
URL: https://github.com/apache/ozone/pull/12145#discussion_r4695763468
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/protocol/ScmBlockLocationProtocolServerSideTranslatorPB.java:
##########
@@ -192,8 +194,10 @@ private SCMBlockLocationResponse processMessage(
} catch (IOException e) {
RatisUtil.checkRatisException(e, scm.getBlockProtocolRpcPort(),
scm.getScmId(), scm.getHostname(), ROLE_TYPE);
+ TracingUtil.recordExceptionInCurrentSpan(e);
response.setSuccess(false);
response.setStatus(exceptionToResponseStatus(e));
+ TracingUtil.addAttributesToCurrentSpan(OzoneTracingAttributes.STATUS,
response.getStatus().name());
Review Comment:
Thanks. We do use span.setStatus() for success/failure:
recordExceptionInCurrentSpan(e), a few lines above, calls
TracingUtil.recordException, which records the exception and sets the span
status to ERROR with the message. So the default error=true tag
(otel.status_code=ERROR) returns every failed request; there is no separate
success/failure marker.
The attribute on this line is not a second success/failure flag, which is
why I renamed it from ozone.status to ozone.error.status in 7ffdb8b3c9. It only
carries the protocol's reason code from the response (e.g.
SAFE_MODE_EXCEPTION), which is not part of the exception message, so failed
requests can be filtered by a specific code. To find failed requests, search
error=true, not this attribute.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]