[fix] [txn] Make txn metrics name conforms to the rule - #17905
Merged
Conversation
poorbarcode
force-pushed
the
flaky/txn_metrics_name
branch
2 times, most recently
from
September 30, 2022 09:06
696e30c to
f50a463
Compare
Contributor
|
@poorbarcode Please help confirm that we don't have a release for the metrics name that you want change. |
Contributor
Author
|
Yes, we don't have a release for these metrics names that I want to change. Thanks |
2 tasks
poorbarcode
force-pushed
the
flaky/txn_metrics_name
branch
from
November 10, 2022 13:37
f50a463 to
55dc2c0
Compare
codelipenghui
approved these changes
Nov 11, 2022
Contributor
We will not release 17701 in 2.11.1 right? |
Contributor
|
/pulsarbot run-failure-checks |
Contributor
Author
Correct, PR #17701 hasn't cherry-picked any branches yet |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #17905 +/- ##
============================================
- Coverage 47.24% 47.20% -0.05%
+ Complexity 10407 10405 -2
============================================
Files 692 692
Lines 67766 67766
Branches 7258 7258
============================================
- Hits 32016 31988 -28
- Misses 32158 32193 +35
+ Partials 3592 3585 -7
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
congbobo184
approved these changes
Nov 16, 2022
14 tasks
12 tasks
12 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #17921
Note:
This patch will change metrics names
s_bufferedwriter_batch_record_countands_bufferedwriter_batch_oldest_record_delay_time_second. These two names were first used in this PR #17701, and PR #17701 hasn't cherry-picked any branches yet, so this change will not cause any breaking changes.Motivation
https://github.com/poorbarcode/pulsar/actions/runs/3156649582/jobs/5136584463
https://github.com/apache/pulsar/actions/runs/3156649597/jobs/5136596447
Problem-1
If the
Prometheus-Colloctorwhich typedCounteris named 'xxx_count', then the outputmetrics-apiwill be named 'xxx_count_count'.TxnLogBufferedWriterMetricsStatshits this error.pulsar/pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/TxnLogBufferedWriterMetricsStats.java
Lines 105 to 106 in fb7307d
Problem-2
PrometheusMetricsTestdefines the standard metrics name(see code below):But the standard Prometheus name has three others( see: https://github.com/prometheus/client_java/blob/c28b901225e35e7c1df0eacae8b58fdfbb390162/simpleclient/src/main/java/io/prometheus/client/Collector.java#L152-L186 ):
pulsar/pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java
Lines 834 to 861 in fb7307d
Modifications
PrometheusMetricsTestrun with transaction featurePrometheusMetricsTestsupport all suffix of prometheus metrics nameDocumentation
doc-not-needed(Please explain why)
Matching PR in forked repository
PR in forked repository: