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

[Metrics] Add the broker connection metrics. #9876

Conversation

congbobo184
Copy link
Contributor

@congbobo184 congbobo184 commented Mar 11, 2021

Motivation

Add the broker connection metrics.

implement

add metrics

brk_connection_created_total_count
brk_connection_create_success_count
brk_connection_create_fail_count
brk_connection_closed_total_count
brk_active_connections

Verifying this change

Add the tests for it

Does this pull request potentially affect one of the following parts:
If yes was chosen, please highlight the changes

Dependencies (does it add or upgrade a dependency): (no)
The public API: (no)
The schema: (no)
The default values of configurations: (no)
The wire protocol: (no)
The rest endpoints: (no)
The admin cli options: (no)
Anything that affects deployment: (no)

@Anonymitaet
Copy link
Member

@congbobo184 thanks for your work. Would you like to add docs accordingly? Then we can help review, thanks

@congbobo184
Copy link
Contributor Author

@Anonymitaet Ok I will add the doc.

@@ -34,6 +35,11 @@
private final DimensionStats zkWriteLatencyStats;
private final DimensionStats zkReadLatencyStats;
private final String brokerName;
private final AtomicLong connectionTotalCreatedCount;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer LongAdder instead of AtomicLong since it will have less contention issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK i will change the atomicLong to LongAdder.

@congbobo184
Copy link
Contributor Author

/pulsarbot run-failure-checks

site2/docs/reference-metrics.md Outdated Show resolved Hide resolved
site2/docs/reference-metrics.md Outdated Show resolved Hide resolved
codelipenghui and others added 2 commits March 15, 2021 19:56
Co-authored-by: Yu Liu <50226895+Anonymitaet@users.noreply.github.com>
Co-authored-by: Yu Liu <50226895+Anonymitaet@users.noreply.github.com>
@codelipenghui codelipenghui merged commit fa68cb2 into apache:master Mar 15, 2021
fmiguelez pushed a commit to fmiguelez/pulsar that referenced this pull request Mar 16, 2021
## Motivation
Add the broker connection metrics.

## implement
add metrics
```
brk_connection_created_total_count
brk_connection_create_success_count
brk_connection_create_fail_count
brk_connection_closed_total_count
brk_active_connections
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants