Skip to content

Commit

Permalink
Minor readme fixes, disable sniffer loggin by default
Browse files Browse the repository at this point in the history
  • Loading branch information
dsalahutdinov committed Mar 23, 2020
1 parent 4b26abd commit 222dca7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

Built-in metrics for external services HTTP calls! This gem is a Part of the [yabeda](https://github.com/yabeda-rb/yabeda) suite.

Read [introduction article on dev.to](https://dev.to/dsalahutdinov/monitoring-external-services-with-prometheus-and-grafana-5eh6).

## Metrics

Works as the Puma plugin and provides following metrics:
Expand Down Expand Up @@ -63,7 +65,7 @@ After docker image builds and all the services get up, you can browse applicatio

Follow the [yabeda-external-http-requests](http://localhost:3000/d/OGd-oEXWz/yabeda-external-http-requests?orgId=1&refresh=5s) dashboard in Grafana.
Finally, after a couple of minutes when data collected you will see the following:
![Monitor external HTTP calls with Grafana](docs/http_requests_rate_by_host.png)
![Monitor external HTTP calls with Grafana](docs/dashboard.png)

## Development with Docker

Expand Down
Binary file added docs/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/http_requests_rate_by_host.png
Binary file not shown.
3 changes: 2 additions & 1 deletion lib/yabeda/http_requests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
module Yabeda
# Common module
module HttpRequests
SNIFFER_STORAGE_SIZE = 1
SNIFFER_STORAGE_SIZE = 0

Yabeda.configure do
group :http
Expand Down Expand Up @@ -37,6 +37,7 @@ module HttpRequests
c.enabled = true
c.store = { capacity: SNIFFER_STORAGE_SIZE }
c.middleware do |chain|
chain.remove(Sniffer::Middleware::Logger)
chain.add(Yabeda::HttpRequests::Sniffer)
end
end
Expand Down

0 comments on commit 222dca7

Please sign in to comment.