{"repo":"yabeda-rb/yabeda-http_requests","free":true,"listed":false,"github":"https://github.com/yabeda-rb/yabeda-http_requests","clone":"git clone https://github.com/yabeda-rb/yabeda-http_requests.git","description":"Buildin metrics for monitor external HTTP requests","language":"Ruby","stars":20,"topics":["ruby","monitoring","external-api","yabeda","metrics"],"license":"MIT","category":"analytics","readme_excerpt":"Built-in metrics for external services HTTP calls! This gem is a Part of the yabeda suite. Read introduction article on dev.to. Metrics Works as the Puma plugin and provides following metrics: - http request total - the number of external HTTP request attempts (by host, port, method) - http response total - the number of made external HTTP requeusts (by host, port, method, status) - http response duration - the histogram of response duration (by host, port, method, status) Installation Add this line to your application's Gemfile: And then execute: $ bundle install Or install it yourself as: $ gem install yabeda-http requests Usage After plugin the gem, you just have to set up metrics exporting with yabeda-prometheus gem. The metrics page will look like this: To simple set up Grafana, try the sample dashboard. Sample application Sample application aims to show how Ruby web-application, this gem and Prometheus/Grafana work togather. Get into example directory and run docker compose: After docker image builds and all the services get up, you can browse application endpoints: - Ruby web-application runs on http://localhost:9292/. Everytime you request page, it schedules random web-scrapping job into sidekiq. - Sidekiq exposes prometheus metrics on http://localhost:9394/metrics. This endpoint is scrapped by prometheus exporter every 5 seconds. - Grafana runs on http://localhost:3000/. Use admin/foobar as login and password to get in. Grafana already has specific dashboard with dat","default_branch":null,"files":null,"tree":[],"storefront":"/r/yabeda-rb","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yabeda-rb/yabeda-http_requests/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}