Skip to content

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

Merged
michaeljmarshall merged 9 commits into
apache:masterfrom
tjiuming:dev/entry_filter_metrics
Aug 15, 2022
Merged

michaeljmarshall merged 9 commits into
apache:masterfrom
tjiuming:dev/entry_filter_metrics

Conversation

@tjiuming

@tjiuming tjiuming commented Aug 3, 2022 •

Copy link
Copy Markdown
Contributor

Fixes #16596

Motivation

add per-subscription EntryFilter metrics for PersistentTopic and NonPersistentTopic.

Modifications

Add the following metrics to Prometheus:

  1. pulsar_subscription_filter_processed_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. filterProcessedMsgCount
  2. filterAcceptedMsgCount
  3. filterRejectedMsgCount
  4. filterRescheduledMsgCount

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • 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

tjiuming commented Aug 3, 2022

Copy link
Copy Markdown
Contributor Author

@eolivelli @michaeljmarshall PTAL

@tjiuming tjiuming changed the title [broker][monitoring] add Subscription level EntryFilter stats [broker][monitoring] add per-subscription EntryFilter metrics Aug 3, 2022
@codelipenghui codelipenghui added this to the 2.12.0 milestone Aug 4, 2022
@Technoboy- Technoboy- modified the milestones: 2.12.0, 2.11.0 Aug 8, 2022
@Technoboy- Technoboy- added area/metrics doc-required Your PR changes impact docs and you will update later. labels Aug 8, 2022

@michaeljmarshall michaeljmarshall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. I think there might need to be some minor clean up before we can merge it though.

Thank you @tjiuming for working on this!

@michaeljmarshall michaeljmarshall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tjiuming - all of the logic looks correct to me. I have some minor comments about method and variable names that I think we should update or discuss before merging this. Let me know what you think. Thanks!

@tjiuming
tjiuming requested a review from lhotari August 14, 2022 08:13

@michaeljmarshall michaeljmarshall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tjiuming - I have one last request for changes before we merge this. I want to make sure the stat names exposed via the admin api match the prometheus metric names as closely as possible. Thanks again for working on this!

@tjiuming

Copy link
Copy Markdown
Contributor Author

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

@michaeljmarshall

Copy link
Copy Markdown
Member

@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

Copy link
Copy Markdown
Contributor Author

@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

@michaeljmarshall

Copy link
Copy Markdown
Member

Thanks @tjiuming! Great work!

@michaeljmarshall
michaeljmarshall merged commit c1c3c86 into apache:master Aug 15, 2022
Technoboy- pushed a commit that referenced this pull request Aug 16, 2022
* add Subscription level EntryFilter stats

* Fix Checkstyle

* add entryfilter stats admin-api test

* review fix

* review fix

* review fix

* review fix

* review fix

Fixes #16596

### Motivation

add per-subscription `EntryFilter` metrics for PersistentTopic and NonPersistentTopic.

### Modifications

Add the following metrics to Prometheus:
1. pulsar_subscription_filter_processed_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. filterProcessedMsgCount
2. filterAcceptedMsgCount
3. filterRejectedMsgCount
4. filterRescheduledMsgCount

### 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)
@Anonymitaet Anonymitaet added doc-complete Your PR changes impact docs and the related docs have been already added. and removed doc-required Your PR changes impact docs and you will update later. labels Aug 16, 2022
Technoboy- pushed a commit to merlimat/pulsar that referenced this pull request Aug 16, 2022
…#16932)

* add Subscription level EntryFilter stats

* Fix Checkstyle

* add entryfilter stats admin-api test

* review fix

* review fix

* review fix

* review fix

* review fix

Fixes apache#16596

### Motivation

add per-subscription `EntryFilter` metrics for PersistentTopic and NonPersistentTopic.

### Modifications

Add the following metrics to Prometheus:
1. pulsar_subscription_filter_processed_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. filterProcessedMsgCount
2. filterAcceptedMsgCount
3. filterRejectedMsgCount
4. filterRescheduledMsgCount

### 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)
michaeljmarshall pushed a commit to datastax/pulsar that referenced this pull request Aug 16, 2022
…#16932)

* add Subscription level EntryFilter stats

* Fix Checkstyle

* add entryfilter stats admin-api test

* review fix

* review fix

* review fix

* review fix

* review fix

Fixes apache#16596

add per-subscription `EntryFilter` metrics for PersistentTopic and NonPersistentTopic.

Add the following metrics to Prometheus:
1. pulsar_subscription_filter_processed_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. filterProcessedMsgCount
2. filterAcceptedMsgCount
3. filterRejectedMsgCount
4. filterRescheduledMsgCount

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)

(cherry picked from commit c1c3c86)
michaeljmarshall pushed a commit that referenced this pull request Aug 23, 2022
* update doc.

* update doc.

### Motivation

fix doc of #16932.

### Documentation

Check the box below or label this PR directly.

Need to update docs? 

- [ ] `doc-required` 
(Your PR needs to update docs and you will update later)
  
- [ ] `doc-not-needed` 
(Please explain why)
  
- [x] `doc` 
(Your PR contains doc changes)

- [ ] `doc-complete`
(Docs have been already added)
@tjiuming
tjiuming deleted the dev/entry_filter_metrics branch August 31, 2022 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/metrics cherry-picked/branch-2.11 doc-complete Your PR changes impact docs and the related docs have been already added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broker: add metrics about server-side filtering (PIP-105)

8 participants