yabeda-rb / yabeda

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

Global tags #6

Closed asusikov closed 4 years ago

asusikov commented 5 years ago

What is about global/common tags? For example, we have few microservices and one prometheus server. But we want to filter metrics by app name. It will be awesome to add app name tag to any metric. How I see this feature. We define global label in configuration

Yabeda.configure do
  # declare metrics
  global_label :app_name, value: 'awesome_app'
end 

It will be add tag app_name with value awesome_app to each metrics. What is your opinion about it?

Envek commented 5 years ago

Hmm, yes, I think it is a viable thing. Not sure about naming, though. Maybe it should be default_label.

I personally can start coding it only on the next week, but pull requests are always welcome! :smile:

asusikov commented 5 years ago

Yes, sure. I will try to implement it🙂