Skip to content
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

Merged
merged 2 commits into from
Aug 10, 2021

Conversation

Technoboy-
Copy link
Contributor

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.

Technoboy- added a commit to Technoboy-/pulsar that referenced this pull request Jul 29, 2021
@codelipenghui codelipenghui added this to the 2.9.0 milestone Jul 29, 2021
@codelipenghui codelipenghui added release/2.8.1 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages labels Jul 29, 2021
@Technoboy-
Copy link
Contributor Author

@codelipenghui :
brk_ml_cursor_writeLedgerSize contains cursor-prefix, do I need to change the metric name to brk_ml_cursor_writeCursorLedgerSize?

@Anonymitaet Anonymitaet added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Jul 30, 2021
Copy link
Member

@Anonymitaet Anonymitaet left a 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.

@Technoboy-
Copy link
Contributor Author

/pulsarbot run-failure-checks

Technoboy- added a commit to Technoboy-/pulsar that referenced this pull request Aug 6, 2021
Technoboy- added a commit to Technoboy-/pulsar that referenced this pull request Aug 6, 2021
Copy link
Member

@michaeljmarshall michaeljmarshall left a 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.

@Technoboy-
Copy link
Contributor Author

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.

Thanks and I have updated the patch.

@codelipenghui
Copy link
Contributor

@michaeljmarshall Please help review again.

Copy link
Member

@michaeljmarshall michaeljmarshall left a 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.

@codelipenghui codelipenghui merged commit bfae8f6 into apache:master Aug 10, 2021
hangc0276 pushed a commit that referenced this pull request Aug 12, 2021
### 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)
@hangc0276 hangc0276 added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Aug 12, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
### 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`.
momo-jun added a commit to momo-jun/pulsar that referenced this pull request Aug 5, 2022
@Technoboy- Technoboy- deleted the add-metrics-2 branch August 10, 2022 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.8 Archived: 2.8 is end of life doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. release/2.8.1 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants