[broker][monitoring] add per-subscription EntryFilter metrics
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:
- pulsar_subscription_through_filter_msg_count
- pulsar_subscription_filter_accepted_msg_count
- pulsar_subscription_filter_rejected_msg_count
- pulsar_subscription_filter_rescheduled_msg_count
Add the following metrics to admin-api:
- throughEntryFilterMsgs
- entryFilterAccepted
- entryFilterRejected
- 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)
@eolivelli @michaeljmarshall PTAL
@michaeljmarshall many thanks for you review! I've resolved all the suggestions, PTAL
@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.
@tjiuming - thanks! Do you feel strongly about keeping
Msgsin the admin stats output, or can we change it toMsgCount? I like the latter because it matches the prometheus metric exactly then.
it makes sense, and I've resolved them
Thanks @tjiuming! Great work!