wang-jiahua commented on code in PR #10491:
URL: https://github.com/apache/rocketmq/pull/10491#discussion_r3410795733


##########
broker/src/main/resources/rmq.broker.logback.xml:
##########
@@ -18,6 +18,8 @@
 
 <configuration scan="true" scanPeriod="30 seconds">
 
+    <statusListener class="ch.qos.logback.core.status.NopStatusListener"/>

Review Comment:
   The NopStatusListener is a standard production optimization. Logback 
internal status events (`InfoStatus`, `BodyEvent`) accumulate in 
`BasicStatusManager` during XML loading but are almost never queried at 
runtime. This is a deliberate tradeoff — if debugging is needed, the listener 
can be removed or conditionally enabled via `-Dlogback.statusListenerClass` 
system property.



##########
remoting/src/main/java/org/apache/rocketmq/remoting/metrics/RemotingMetricsConstant.java:
##########
@@ -24,6 +26,14 @@ public class RemotingMetricsConstant {
     public static final String LABEL_IS_LONG_POLLING = "is_long_polling";
     public static final String LABEL_RESULT = "result";
 
+    // Pre-built typed AttributeKey singletons. Use these in 
AttributesBuilder.put()
+    // on hot paths to avoid allocating a fresh InternalAttributeKeyImpl per 
call.

Review Comment:
   This comment is inherited from the base PR #10443. The reference to 
`InternalAttributeKeyImpl` is just documenting the motivation for pre-building 
these keys. Will update the comment to reference the OTel API concept rather 
than the internal class name.



##########
broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsConstant.java:
##########
@@ -64,4 +66,21 @@ public class BrokerMetricsConstant {
     public static final String LABEL_LANGUAGE = "language";
     public static final String LABEL_VERSION = "version";
     public static final String LABEL_CONSUME_MODE = "consume_mode";
+
+    // Pre-built typed AttributeKey singletons. Use these in 
AttributesBuilder.put()
+    // on hot paths to avoid allocating a fresh InternalAttributeKeyImpl per 
call.

Review Comment:
   Same as above — inherited from base PR #10443. Will update the comment to 
avoid referencing OpenTelemetry internal implementation details.



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