-
Notifications
You must be signed in to change notification settings - Fork 12k
[ISSUE #10490] Eliminate per-RPC allocation from Logback status, TopicMessageType toLowerCase, and RemotingHelper eager evaluation #10491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,8 @@ | |
|
|
||
| <configuration scan="true" scanPeriod="30 seconds"> | ||
|
|
||
| <statusListener class="ch.qos.logback.core.status.NopStatusListener"/> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The NopStatusListener is a standard production optimization. Logback internal status events ( |
||
|
|
||
| <appender name="DefaultSiftingAppender_inner" class="ch.qos.logback.classic.sift.SiftingAppender"> | ||
| <discriminator> | ||
| <key>brokerContainerLogDir</key> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,8 @@ | |
| */ | ||
| package org.apache.rocketmq.remoting.metrics; | ||
|
|
||
| import io.opentelemetry.api.common.AttributeKey; | ||
|
|
||
| public class RemotingMetricsConstant { | ||
| public static final String HISTOGRAM_RPC_LATENCY = "rocketmq_rpc_latency"; | ||
| public static final String LABEL_PROTOCOL_TYPE = "protocol_type"; | ||
|
|
@@ -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. | ||
|
Comment on lines
+29
to
+30
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment is inherited from the base PR #10443. The reference to |
||
| public static final AttributeKey<String> LABEL_PROTOCOL_TYPE_KEY = AttributeKey.stringKey(LABEL_PROTOCOL_TYPE); | ||
| public static final AttributeKey<String> LABEL_REQUEST_CODE_KEY = AttributeKey.stringKey(LABEL_REQUEST_CODE); | ||
| public static final AttributeKey<String> LABEL_RESPONSE_CODE_KEY = AttributeKey.stringKey(LABEL_RESPONSE_CODE); | ||
| public static final AttributeKey<Boolean> LABEL_IS_LONG_POLLING_KEY = AttributeKey.booleanKey(LABEL_IS_LONG_POLLING); | ||
| public static final AttributeKey<String> LABEL_RESULT_KEY = AttributeKey.stringKey(LABEL_RESULT); | ||
|
|
||
| public static final String PROTOCOL_TYPE_REMOTING = "remoting"; | ||
|
|
||
| public static final String RESULT_ONEWAY = "oneway"; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above — inherited from base PR #10443. Will update the comment to avoid referencing OpenTelemetry internal implementation details.