You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/11/25 12:28:04 UTC

[GitHub] [pulsar] pgier opened a new pull request, #18440: [feat][broker] Expose pulsar out bytes and message metrics per topic

pgier opened a new pull request, #18440:
URL: https://github.com/apache/pulsar/pull/18440

   Add prometheus metrics which expose the per topic messages out and bytes out total on a per topic basis.  Currently, only the subscription level stats are enabled.
   
   ### Motivation
   
   There are currently two metrics `pulsar_out_bytes_total` and `pulsar_out_messages_total`.  The metrics represent the pulsar stats on a per subscription basis.  It would be convenient to be able to see the summary of these values per topic similar to the stats exposed by pulsar-admin.
   
   ### Modifications
   
   Added the two metrics and updated the test to verify that the output is correct.
   
   ### Verifying this change
   
   - [X] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, such as *(please describe tests)*.  I made an enhancement to the existing Promtheus metrics test.
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. Please attach the local preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR description, or else your PR might not get merged. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [X] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: https://github.com/pgier/pulsar/pull/1
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] codecov-commenter commented on pull request #18440: [feat][broker] Expose pulsar out bytes and message metrics per topic

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #18440:
URL: https://github.com/apache/pulsar/pull/18440#issuecomment-1327431118

   # [Codecov](https://codecov.io/gh/apache/pulsar/pull/18440?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#18440](https://codecov.io/gh/apache/pulsar/pull/18440?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (94dc7df) into [master](https://codecov.io/gh/apache/pulsar/commit/fdf86d3b4e66e25936c2e2143bb5809b079ebc0d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fdf86d3) will **decrease** coverage by `8.53%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/pulsar/pull/18440/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/pulsar/pull/18440?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #18440      +/-   ##
   ============================================
   - Coverage     45.67%   37.13%   -8.54%     
   + Complexity    10075     1971    -8104     
   ============================================
     Files           693      209     -484     
     Lines         67940    14420   -53520     
     Branches       7273     1573    -5700     
   ============================================
   - Hits          31030     5355   -25675     
   + Misses        33333     8479   -24854     
   + Partials       3577      586    -2991     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | unittests | `37.13% <ø> (-8.54%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/pulsar/pull/18440?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...apache/pulsar/client/impl/AutoClusterFailover.java](https://codecov.io/gh/apache/pulsar/pull/18440/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL0F1dG9DbHVzdGVyRmFpbG92ZXIuamF2YQ==) | `70.00% <0.00%> (-5.56%)` | :arrow_down: |
   | [.../pulsar/client/impl/ControlledClusterFailover.java](https://codecov.io/gh/apache/pulsar/pull/18440/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL0NvbnRyb2xsZWRDbHVzdGVyRmFpbG92ZXIuamF2YQ==) | `58.87% <0.00%> (-3.74%)` | :arrow_down: |
   | [.../java/org/apache/pulsar/client/impl/ClientCnx.java](https://codecov.io/gh/apache/pulsar/pull/18440/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL0NsaWVudENueC5qYXZh) | `29.97% <0.00%> (-0.20%)` | :arrow_down: |
   | [...va/org/apache/pulsar/client/impl/ConsumerBase.java](https://codecov.io/gh/apache/pulsar/pull/18440/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL0NvbnN1bWVyQmFzZS5qYXZh) | `21.93% <0.00%> (-0.02%)` | :arrow_down: |
   | [...a/org/apache/pulsar/client/impl/TableViewImpl.java](https://codecov.io/gh/apache/pulsar/pull/18440/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1RhYmxlVmlld0ltcGwuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...pache/pulsar/client/impl/TableViewBuilderImpl.java](https://codecov.io/gh/apache/pulsar/pull/18440/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1RhYmxlVmlld0J1aWxkZXJJbXBsLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...r/client/impl/UnAckedMessageRedeliveryTracker.java](https://codecov.io/gh/apache/pulsar/pull/18440/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1VuQWNrZWRNZXNzYWdlUmVkZWxpdmVyeVRyYWNrZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...che/pulsar/broker/stats/prometheus/TopicStats.java](https://codecov.io/gh/apache/pulsar/pull/18440/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zdGF0cy9wcm9tZXRoZXVzL1RvcGljU3RhdHMuamF2YQ==) | | |
   | [...ats/prometheus/PulsarPrometheusMetricsServlet.java](https://codecov.io/gh/apache/pulsar/pull/18440/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zdGF0cy9wcm9tZXRoZXVzL1B1bHNhclByb21ldGhldXNNZXRyaWNzU2VydmxldC5qYXZh) | | |
   | [...delayed/InMemoryDelayedDeliveryTrackerFactory.java](https://codecov.io/gh/apache/pulsar/pull/18440/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9kZWxheWVkL0luTWVtb3J5RGVsYXllZERlbGl2ZXJ5VHJhY2tlckZhY3RvcnkuamF2YQ==) | | |
   | ... and [495 more](https://codecov.io/gh/apache/pulsar/pull/18440/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [feat][broker] Expose pulsar out bytes and message metrics per topic [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on PR #18440:
URL: https://github.com/apache/pulsar/pull/18440#issuecomment-6357525356

   Thanks @pgier, and sorry this sat so long after approval. Since PIP-264, master exposes per-topic outbound counters in OpenTelemetry as `pulsar.broker.topic.message.outgoing.count` and `pulsar.broker.topic.message.outgoing.size`, and the Prometheus fields behind this change are marked deprecated in favor of them, so we're not adding new series to the old exposition. With Prometheus you can get the same value via `sum by (topic) (pulsar_out_bytes_total{subscription!="", consumer=""})`. Closing as superseded; please reopen if the OTel metrics don't cover your case.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] RobertIndie commented on pull request #18440: [feat][broker] Expose pulsar out bytes and message metrics per topic

Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie commented on PR #18440:
URL: https://github.com/apache/pulsar/pull/18440#issuecomment-1502605055

   /pulsarbot run-failure-checks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] RobertIndie closed pull request #18440: [feat][broker] Expose pulsar out bytes and message metrics per topic

Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie closed pull request #18440: [feat][broker] Expose pulsar out bytes and message metrics per topic
URL: https://github.com/apache/pulsar/pull/18440


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [feat][broker] Expose pulsar out bytes and message metrics per topic [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat closed pull request #18440: [feat][broker] Expose pulsar out bytes and message metrics per topic
URL: https://github.com/apache/pulsar/pull/18440


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on pull request #18440: [feat][broker] Expose pulsar out bytes and message metrics per topic

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #18440:
URL: https://github.com/apache/pulsar/pull/18440#issuecomment-1364806360

   The pr had no activity for 30 days, mark with Stale label.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on pull request #18440: [feat][broker] Expose pulsar out bytes and message metrics per topic

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18440:
URL: https://github.com/apache/pulsar/pull/18440#issuecomment-1546492234

   The pr had no activity for 30 days, mark with Stale label.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] cbornet commented on pull request #18440: [feat][broker] Expose pulsar out bytes and message metrics per topic

Posted by "cbornet (via GitHub)" <gi...@apache.org>.
cbornet commented on PR #18440:
URL: https://github.com/apache/pulsar/pull/18440#issuecomment-1503584484

   @pgier there's a test failure: https://github.com/apache/pulsar/actions/runs/4664751844/jobs/8257572250?pr=18440#step:11:1521
   Can you check ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Technoboy- closed pull request #18440: [feat][broker] Expose pulsar out bytes and message metrics per topic

Posted by GitBox <gi...@apache.org>.
Technoboy- closed pull request #18440: [feat][broker] Expose pulsar out bytes and message metrics per topic
URL: https://github.com/apache/pulsar/pull/18440


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org