Yabeda + Prometheus

Public
Adds the yabeda + yabeda-prometheus
Icons/chart bar
Used 26 times
Created by
A Adrian Madrid

Usage
Adds both gems and a initializer for the yabeda platform.

Run this command in your Rails app directory in the terminal:

rails app:template LOCATION="https://railsbytes.com/script/zJosj7"
Template Source

Review the code before running this template on your machine.

gem 'yabeda'
gem 'yabeda-prometheus'

initializer 'yabeda.rb', <<-CODE
  Yabeda.configure do
    default_tag :rails_environment, ENV.fetch('RAILS_ENV', 'development')
  #   group :your_app do
  #     counter   :bells_rang_count, comment: "Total number of bells being rang", tags: %i[bell_size]
  #     gauge     :whistles_active,  comment: "Number of whistles ready to whistle"
  #     histogram :whistle_runtime do
  #       comment "How long whistles are being active"
  #       unit :seconds
  #     end
  #   end
  end
  
  Yabeda.configure!
CODE

inject_into_file 'config.ru', :before => "\nrun Rails.application" do
  "\nuse Yabeda::Prometheus::Exporter\n"
end
Comments

Sign up or Login to leave a comment.