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

Support for labels/tags for individual default metrics. #22

Open
surbhig213 opened this issue May 13, 2021 · 4 comments
Open

Support for labels/tags for individual default metrics. #22

surbhig213 opened this issue May 13, 2021 · 4 comments

Comments

@surbhig213
Copy link

Hey @Envek,
How can I add a custom tag to default sidekiq metrics. Right now a default tag gets added to all the sidekiq metrics. Is there a way to add a tag to just one metrics?

@Envek
Copy link
Member

Envek commented May 13, 2021

You can use per-group default tags available in yabeda since 0.9.0. See #19

Upgrade yabeda gem and place this somewhere in your app initialization:

Yabeda.configure do
  default_tag :label, 'value', group: :sidekiq
end

@surbhig213
Copy link
Author

Thanks @Envek . When I add deault_tag to a group the tag is added to all the metrics in that group.
What should I do if I have to add tag to just this metric - sidekiq_jobs_executed_total

@Envek Envek transferred this issue from yabeda-rb/yabeda-sidekiq May 14, 2021
@Envek
Copy link
Member

Envek commented May 14, 2021

No, it is not possible now. It should be handled on main yabeda gem level, so I transferred this issue there.

Can you please tell more about your use case? Why you need to add label only to one metric, or why you don't want not to add it to others? Usually extra labels doesn't hurt and you can ignore them

@surbhig213
Copy link
Author

Hey @Envek ,
The use case is same as this issue that I raised.
#21
Our system expects metrics with a particular label, so I was trying to add that label to a few metrics only that we need.

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

No branches or pull requests

2 participants