-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add metrics for writing or reading size of cursor #11500
Conversation
8c3253e
to
445f8f8
Compare
pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/ManagedCursorMetricsTest.java
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
@codelipenghui : |
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Outdated
Show resolved
Hide resolved
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.
Thanks for your contribution. Approved from the language perspective.
/pulsarbot run-failure-checks |
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Show resolved
Hide resolved
68730b2
to
5b6fed9
Compare
a4f991d
to
d68e3b5
Compare
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.
I think we might need to remove the single dimension metrics for namespace
. See comments for details.
Otherwise, the new metrics look good to me.
pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/metrics/ManagedCursorMetrics.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java
Outdated
Show resolved
Hide resolved
d68e3b5
to
105ae9c
Compare
Thanks and I have updated the patch. |
@michaeljmarshall Please help review again. |
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.
Looks good. Minor comment about updating a Javadoc.
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursorMXBean.java
Show resolved
Hide resolved
664539d
to
776820a
Compare
### Motivation Currently, there is no visibility about the following activities: - How many bytes are written from a cursor update? - How many bytes are read from loading a cursor? So when the bookkeeper cluster is having heavy traffic, it is hard to tell which topic or namespace contributes most of the traffic. Add metrics at the broker about how many bytes are written and read per cursor/namespace. ### Modifications Add metrics `writeLedgerSize`, `writeLedgerLogicalSize`, `readLedgerSize`. (cherry picked from commit bfae8f6)
### Motivation Currently, there is no visibility about the following activities: - How many bytes are written from a cursor update? - How many bytes are read from loading a cursor? So when the bookkeeper cluster is having heavy traffic, it is hard to tell which topic or namespace contributes most of the traffic. Add metrics at the broker about how many bytes are written and read per cursor/namespace. ### Modifications Add metrics `writeLedgerSize`, `writeLedgerLogicalSize`, `readLedgerSize`.
Motivation
Currently, there is no visibility about the following activities:
So when the bookkeeper cluster is having heavy traffic, it is hard to tell which topic or namespace contributes most of the traffic.
Add metrics at the broker about how many bytes are written and read per cursor/namespace.
Modifications
Add metrics
writeLedgerSize
,writeLedgerLogicalSize
,readLedgerSize
.