BewareMyPower commented on code in PR #26163:
URL: https://github.com/apache/pulsar/pull/26163#discussion_r3575611973
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -1313,31 +1313,32 @@ public CompletableFuture<Optional<Topic>>
getTopic(final TopicName topicName, bo
context.setProperties(properties);
}
topicFuture.exceptionally(t -> {
- final var now = System.nanoTime();
+ final var latency =
context.traceAndGetLatency("fail").description();
if (FutureUtil.unwrapCompletionException(t) instanceof
TimeoutException) {
log.warn()
.attr("topic", topicName)
- .attr("latencyMs", context.latencyMs(now))
+ .attr("latency", latency)
.log("Failed to load topic");
} else {
log.warn()
.attr("topic", topicName)
- .attr("latencyMs", context.latencyString(now))
+ .attr("latency", latency)
.exception(t)
.log("Failed to load topic");
}
pulsarStats.recordTopicLoadFailed();
return Optional.empty();
});
- checkNonPartitionedTopicExists(topicName).thenAccept(exists ->
{
+ context.trace("topic exists",
checkNonPartitionedTopicExists(topicName)).thenAccept(exists -> {
Review Comment:
Ah, this callback is too long, so I made a mistake
--
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]