merlimat commented on code in PR #22058:
URL: https://github.com/apache/pulsar/pull/22058#discussion_r1491841381


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -146,18 +148,24 @@ public class NamespaceService implements AutoCloseable {
 
     private final RedirectManager redirectManager;
 
-
+    /** @deprecated by {@link #lookupRedirectsCounter} */

Review Comment:
   Should we consider adding an ad-hoc Java annotation here. It would make our 
life easier when we'll remove these metrics.



##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -205,16 +232,21 @@ public CompletableFuture<Optional<LookupResult>> 
getBrokerServiceUrlAsync(TopicN
                 });
 
         future.thenAccept(optResult -> {
-            lookupLatency.observe(System.nanoTime() - startTime, 
TimeUnit.NANOSECONDS);
+            var latencyNs = System.nanoTime() - startTime;
+            lookupLatency.observe(latencyNs, TimeUnit.NANOSECONDS);
+            lookupLatencyHistogram.record(latencyNs / 1_000_000_000.0);

Review Comment:
   Should we add a utility method to convert nanos to seconds (with double)? It 
might come up multiple ways



-- 
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]

Reply via email to