lhotari commented on code in PR #24815:
URL: https://github.com/apache/pulsar/pull/24815#discussion_r2408472557


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpenTelemetryManagedLedgerStats.java:
##########
@@ -151,4 +213,24 @@ private void recordMetrics(ManagedLedger ml) {
         markDeleteCounter.record(stats.getMarkDeleteTotal(), attributes);
         
readEntryCacheMissCounter.record(stats.getReadEntriesOpsCacheMissesTotal(), 
attributes);
     }
+
+    void recordAddEntryLatency(long latency, TimeUnit unit, ManagedLedger ml) {
+        final var attributes = 
ml.getManagedLedgerAttributes().getAttributesOnlyNamespace();

Review Comment:
   Now I got it from the referenced PIP-264 section. "In OTel, the API doesn't 
support remove() for an attribute set on an instrument (counter, histogram, 
etc.).". I didn't understand the asynchronous vs. synchronous description and 
the lack of being able to remove the instruments makes more sense to me. 
Perhaps summarizing the reason to use `getAttributesOnlyNamespace` in a code 
comment would be useful.



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