yabeda-rb / yabeda

Extendable framework for collecting and exporting metrics from your Ruby application
MIT License
775 stars 25 forks source link

No apply default_tags to all metrics #16

Closed javirln closed 3 years ago

javirln commented 4 years ago

Hi,

Just wanted to ask if it was possible to add default tags only to specific metrics and not all. In my use case I have set up a default tag that's currently being applied to all metrics exported by yabeda-rails but, there are other metrics where I don't want that tag to appear, is it possible to hide/not apply them?

Thanks

Envek commented 4 years ago

No, it is not possible as for now.

If you have any ideas on how API for this should look like, feel free to share your thoughts!

I will think about it, so will keep this issue open.

asusikov commented 4 years ago

What about this?

Yabeda.configure do
  default_tag :rails_environment, 'production', group: :your_app
end

This set tags only for metrics in your_app group.