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 store_settings option #10

Closed
Arkweid opened this issue Jan 15, 2020 · 1 comment
Closed

Support store_settings option #10

Arkweid opened this issue Jan 15, 2020 · 1 comment

Comments

@Arkweid
Copy link

Arkweid commented Jan 15, 2020

Prometheus define new settings for metrics store_setting
https://github.com/prometheus/client_ruby#aggregation-settings-for-multi-process-stores

It would be nice to adapt metrics(store_settings: metric.store added):
https://github.com/yabeda-rb/yabeda-prometheus/blob/master/lib/yabeda/prometheus/adapter.rb

    def register_gauge!(metric)
      validate_metric!(metric)
      registry.gauge(build_name(metric), docstring: metric.comment, labels: Array(metric.tags), store_settings: metric.store)
    end
@Envek
Copy link
Member

Envek commented Jan 29, 2020

I've released yabeda 0.5 and yabeda-prometheus 0.5 with support for metric aggregation with following syntax in the Yabeda metric declaration:

group :some do
  gauge :tasks do
    comment "Number of test tasks"
    aggregation :max
  end
end

Please try it and share your thoughts!

However, be aware of stale metrics that can appear when you're using prometheus' direct file store. See prometheus/client_ruby#109, prometheus/client_ruby#173, and yabeda-rb/yabeda-puma-plugin#8

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