-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
[RIP-46] Enhanced metrics for timing and transactional messages #7500
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #7500 +/- ##
=============================================
+ Coverage 42.53% 43.01% +0.47%
- Complexity 9441 9698 +257
=============================================
Files 1150 1160 +10
Lines 82746 84219 +1473
Branches 10778 10936 +158
=============================================
+ Hits 35196 36226 +1030
- Misses 43139 43499 +360
- Partials 4411 4494 +83
... and 118 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -18,7 +18,6 @@ | |||
|
|||
public class RemotingMetricsConstant { | |||
public static final String HISTOGRAM_RPC_LATENCY = "rocketmq_rpc_latency"; | |||
|
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.
no need to change this line
@@ -65,10 +43,35 @@ | |||
import org.apache.rocketmq.store.config.BrokerRole; | |||
import org.apache.rocketmq.store.config.MessageStoreConfig; | |||
import org.apache.rocketmq.store.logfile.MappedFile; | |||
import org.apache.rocketmq.store.metrics.DefaultStoreMetricsConstant; |
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.
too many import changes, and most are not needed
LGTM~ |
Which Issue(s) This PR Fixes
Some enhanced metrics of RIP-46, link to #5350
Brief Description
The following metrics related to timing messages have been added:
rocketmq_timing_end_messages_total
, COUNTER, records the number of timing messages that have ended, aggregated by topic.rocketmq_delay_message_latency
, HISTOGRAM, records the distribution of timing message delay durations when sent, aggregated by topic.rocketmq_timer_message_snapshot
, GUAGE, records the distribution of timing messages in the timing wheel (right now). Not aggregated by topic.The following metrics related to transactional messages have been added:
rocketmq_half_messages
, GAUGE, records the number of half messages in transactional scenarios, aggregated by topic.rocketmq_commit_messages_total
, COUNTER, records the number of messages committed in transactions, aggregated by topic.rocketmq_rollback_messages_total
, COUNTER, records the number of messages rolled back in transactions, aggregated by topic.rocketmq_transaction_finish_latency
, HISTOGRAM, records the distribution of delay times for committing transactional half messages, aggregated by topic.In addition, to calculate metrics related to transactional messages, a new data structure called TransactionMetrics has been added to record the number of transactional half messages under each topic.
How Did You Test This Change?
I will provide a test report later.