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

[feat] [broker] expose out bytes and message metrics per topic #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pgier
Copy link
Owner

@pgier pgier commented Nov 12, 2022

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.

Signed-off-by: Paul Gier paul.gier@datastax.com

  • Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.

  • Each pull request should address only one issue, not mix up code from multiple issues.

  • Each commit in the pull request has a meaningful commit message

  • Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
    -->

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

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

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

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

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.

Signed-off-by: Paul Gier <paul.gier@datastax.com>
@pgier pgier changed the title broker: expose topic out metrics [feat] [broker] expose out bytes and message metrics per topic Nov 12, 2022
@github-actions
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant