Skip to content

Conversation

@markusgust
Copy link
Contributor

@markusgust markusgust commented May 16, 2024

Proposed Changes

Off the back of discussion in a previous PR: #10275 (comment)

Adding segment count to queue_metrics ets table and expose value prometheus. Exposing the current segment count of a stream can help users calculate a rough stream size using segment counts * max-segment-size.

If merged, will add the necessary documentation to https://github.com/rabbitmq/rabbitmq-website in a separate PR.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

Put an x in the boxes that apply.
You can also fill these out after creating the PR.
If you're unsure about any of them, don't hesitate to ask on the mailing list.
We're here to help!
This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

Further Comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution
you did and what alternatives you considered, etc.

@markusgust markusgust changed the title added segment file count to queue_metrics and expose in prometheus Prometheus: add segment file count to queue_metrics and expose May 16, 2024
@markusgust markusgust marked this pull request as ready for review May 16, 2024 03:58
@kjnilsson kjnilsson self-requested a review May 22, 2024 07:42
Copy link
Contributor

@kjnilsson kjnilsson left a comment

Choose a reason for hiding this comment

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

I think this looks fine as it is only exposing a pre-existing counter value.

Ideally I think we should maintain a gauge in osiris with a more accurate stream size (including indexes) and expose that through osiris_counters but that can be added later.

@markusgust markusgust force-pushed the expose_segment_count_prometheus branch from 5313a19 to 3b1ff80 Compare May 22, 2024 21:50
@michaelklishin michaelklishin merged commit a8d9b9c into rabbitmq:main May 25, 2024
michaelklishin added a commit that referenced this pull request May 25, 2024
Prometheus: add segment file count to queue_metrics and expose (backport #11245)
@markusgust markusgust deleted the expose_segment_count_prometheus branch May 30, 2024 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants