statsd-rack-instrument 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/statsd_rack_instrument.rb +8 -2
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2a1397aa87a3894a0bde79eef9c100a7d41d2b9d19d3b7be3a63916901392a6
|
4
|
+
data.tar.gz: c72742de95f317b4752c2a16fee0b64188e0d69e13662160c46a9afaf7ebb6dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c9d19977d64f47d4dfb963ac374ef52a3c78fd6f39a9069d3fb95a9fad4de6d7e5d8bc5c4c62b4b0bc119e409702f34fef7fccffcae73e4be76cd5f9feb44ba
|
7
|
+
data.tar.gz: d7378976d83f830b1d2157d8732251006d7fafab6c6d832511f3b56d1f8ab3ad9ce5136d2bfbec2807183d214cb3f311b336edd47fddf12efc4d12a08cea19ed
|
@@ -23,11 +23,15 @@ class StatsDRackInstrument
|
|
23
23
|
method: env['REQUEST_METHOD'].downcase,
|
24
24
|
path: build_path(env)
|
25
25
|
}
|
26
|
-
StatsD.histogram(
|
26
|
+
StatsD.histogram(
|
27
|
+
'rack_server_request_duration_seconds', duration, tags: tags
|
28
|
+
)
|
27
29
|
|
28
30
|
response
|
29
31
|
rescue => e
|
30
|
-
StatsD.increment(
|
32
|
+
StatsD.increment(
|
33
|
+
'rack_server_exceptions_total', tags: { exception: e.class.name }
|
34
|
+
)
|
31
35
|
raise
|
32
36
|
end
|
33
37
|
|
@@ -42,6 +46,8 @@ class StatsDRackInstrument
|
|
42
46
|
'/:uuid\\1'
|
43
47
|
).gsub(
|
44
48
|
%r{/\d+(/|$)}, '/:id\\1'
|
49
|
+
).gsub(
|
50
|
+
%r{/[a-f\d]{24}(/|$)}, '/:object-id\\1'
|
45
51
|
)
|
46
52
|
end
|
47
53
|
end
|
metadata
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statsd-rack-instrument
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- michal-kazmierczak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: statsd-instrument
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '3.1'
|
27
27
|
description: 'The statsd-rack-instrument gem enables a quick implementation of StatsD
|
28
|
-
metrics. It adds metrics such as:
|
29
|
-
|
28
|
+
metrics. It adds metrics such as: rack_server_request_duration_seconds (histogram)
|
29
|
+
and rack_server_exceptions_total (counter).'
|
30
30
|
email:
|
31
31
|
executables: []
|
32
32
|
extensions: []
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
|
-
rubygems_version: 3.
|
56
|
+
rubygems_version: 3.4.10
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: StatsD instrumentation for Rack servers
|