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

Ability to route some metrics only for given adapter #39

Conversation

killondark
Copy link

@killondark killondark commented Sep 25, 2024

Hi. Check my feature realization «Ability to route some metrics only for given adapter»

@Envek
Copy link
Member

Envek commented Oct 1, 2024

Hey, @killondark, thanks a lot for the pull request!

However, @Keallar was first with #37, so I'm closing this pull request in favor of it.

But I believe that this feature is still far from being complete for all possible real world use cases, so please try it, and feel free to open another pull request with any additions or fixes!

@Envek Envek closed this Oct 1, 2024
@@ -38,6 +38,16 @@ def group(group_name)
@group = nil
end

def adapter(adapter_name)
@adapter_name = adapter_name
yield if block_given?
Copy link
Member

Choose a reason for hiding this comment

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

Love that you thought about usage with groups and very curious about this yield. How you planned to use it?

It may worth to be cherry-picked into separate pull request!

Copy link
Author

Choose a reason for hiding this comment

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

I did it for this:

adapter :prometheus do
  include_group :sidekiq
end

Initialize the group configuration, before or after that declare that this is a group of only this adapter: sidekiq group only for prometheus adapter.

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.

2 participants