pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[broker][monitoring] add per-subscription EntryFilter metrics

Open tjiuming opened this issue 3 years ago • 1 comments

Fixes https://github.com/apache/pulsar/issues/16596

Motivation

add per-subscription EntryFilter metrics for PersistentTopic and NonPersistentTopic.

Modifications

Add the following metrics to Prometheus:

  1. pulsar_subscription_through_filter_msg_count
  2. pulsar_subscription_filter_accepted_msg_count
  3. pulsar_subscription_filter_rejected_msg_count
  4. pulsar_subscription_filter_rescheduled_msg_count

Add the following metrics to admin-api:

  1. throughEntryFilterMsgs
  2. entryFilterAccepted
  3. entryFilterRejected
  4. entryFilterRescheduled

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • [x] doc-required (Your PR needs to update docs and you will update later)

  • [ ] doc-not-needed (Please explain why)

  • [ ] doc (Your PR contains doc changes)

  • [ ] doc-complete (Docs have been already added)

tjiuming avatar Aug 03 '22 14:08 tjiuming

@eolivelli @michaeljmarshall PTAL

tjiuming avatar Aug 03 '22 14:08 tjiuming

@michaeljmarshall many thanks for you review! I've resolved all the suggestions, PTAL

tjiuming avatar Aug 15 '22 17:08 tjiuming

@tjiuming - thanks! Do you feel strongly about keeping Msgs in the admin stats output, or can we change it to MsgCount? I like the latter because it matches the prometheus metric exactly then.

michaeljmarshall avatar Aug 15 '22 17:08 michaeljmarshall

@tjiuming - thanks! Do you feel strongly about keeping Msgs in the admin stats output, or can we change it to MsgCount? I like the latter because it matches the prometheus metric exactly then.

it makes sense, and I've resolved them

tjiuming avatar Aug 15 '22 18:08 tjiuming

Thanks @tjiuming! Great work!

michaeljmarshall avatar Aug 15 '22 22:08 michaeljmarshall