yabeda-http_requests 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01bace4735a867891820dd93841a8644b1f3937e0d51680cc7179ba508bea8d3
4
- data.tar.gz: 4bea13b8f7843f97673dbaaf529b27f16de4fce6d548271e3dbd70e64a4142cd
3
+ metadata.gz: 43cc6ecb711ff652a406dd978752ebd74a0d976c9f4a296f596fb2eaca72b5be
4
+ data.tar.gz: f057f0dda68946fddf678dbb4f16cd2836cb047122d4611a6563f00b30270e36
5
5
  SHA512:
6
- metadata.gz: d9d17867e1a4c0a2405526c0f5f8e0f6a715bf2256781128e58f0a6b894a80772350138537ac6260770554204798b913684853edaa9cee5049e9123b36e66c8e
7
- data.tar.gz: 48df8e0f9ac3f1d5715464ec3756dd4fb9989412abae0407e489a4dc2ade86436eb33eb6df814971d40db8abd67e2a41fc198e181b4c6ec7062b8e3fe1998dce
6
+ metadata.gz: 6d814205abf556894e66b3e5d3f44b2a5dd2fa63fde60bace12e7cb1e3d02431fb7c8512eff4198d5cd3a0875abc616bc2fa1ad9dc04011c8e0aeea41bc26394
7
+ data.tar.gz: 4590691d23794c7ea249c87f220231b8de30d770c632d8cad2a0509e670c2ffe9839d2d498d2993f54f298f65f74efce2f7c1d8045329b733a8dc26dfc1aec10
data/README.md CHANGED
@@ -7,12 +7,14 @@
7
7
 
8
8
  Built-in metrics for external services HTTP calls! This gem is a Part of the [yabeda](https://github.com/yabeda-rb/yabeda) suite.
9
9
 
10
+ Read [introduction article on dev.to](https://dev.to/dsalahutdinov/monitoring-external-services-with-prometheus-and-grafana-5eh6).
11
+
10
12
  ## Metrics
11
13
 
12
14
  Works as the Puma plugin and provides following metrics:
13
15
  - `http_request_total` - the number of external HTTP request attempts (by host, port, method)
14
16
  - `http_response_total` - the number of made external HTTP requeusts (by host, port, method, status)
15
- - `http_response_duuration` - the histogram of response duration (by host, port, method, status)
17
+ - `http_response_duration` - the histogram of response duration (by host, port, method, status)
16
18
 
17
19
  ## Installation
18
20
 
@@ -63,7 +65,7 @@ After docker image builds and all the services get up, you can browse applicatio
63
65
 
64
66
  Follow the [yabeda-external-http-requests](http://localhost:3000/d/OGd-oEXWz/yabeda-external-http-requests?orgId=1&refresh=5s) dashboard in Grafana.
65
67
  Finally, after a couple of minutes when data collected you will see the following:
66
- ![Monitor external HTTP calls with Grafana](docs/http_requests_rate_by_host.png)
68
+ ![Monitor external HTTP calls with Grafana](docs/dashboard.png)
67
69
 
68
70
  ## Development with Docker
69
71
 
@@ -8,6 +8,8 @@ require 'sniffer'
8
8
  module Yabeda
9
9
  # Common module
10
10
  module HttpRequests
11
+ SNIFFER_STORAGE_SIZE = 0
12
+
11
13
  Yabeda.configure do
12
14
  group :http
13
15
 
@@ -33,7 +35,9 @@ module Yabeda
33
35
 
34
36
  ::Sniffer.config do |c|
35
37
  c.enabled = true
38
+ c.store = { capacity: SNIFFER_STORAGE_SIZE }
36
39
  c.middleware do |chain|
40
+ chain.remove(Sniffer::Middleware::Logger)
37
41
  chain.add(Yabeda::HttpRequests::Sniffer)
38
42
  end
39
43
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yabeda
4
4
  module HttpRequests
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yabeda-http_requests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Salahutdinov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-19 00:00:00.000000000 Z
11
+ date: 2020-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sniffer