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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: efaa90e27b52691e9d7f9cca3a3c2cc73a3d64c3ce215b434fc9c08f15a080d5
4
- data.tar.gz: 33f3feca670e74cb73c2000db678798e711a9176a76e42d11b3401a9242292ec
3
+ metadata.gz: b2a1397aa87a3894a0bde79eef9c100a7d41d2b9d19d3b7be3a63916901392a6
4
+ data.tar.gz: c72742de95f317b4752c2a16fee0b64188e0d69e13662160c46a9afaf7ebb6dd
5
5
  SHA512:
6
- metadata.gz: 9d7ebb5d97cfef20af5da2a13ef486de62343efed00549fd8c2da35bfa0d7c98aa5403c999ce5df3701b1a5a2e727eb724667c03951b7790daab2ef7a7914b8e
7
- data.tar.gz: 1bb91c1c8041cafd0c8c9dd92a142c76ecfcd2f0037a91f399688d54b0837dc6194dfc776cba08e7a8affd6b3f275740a16b5ecfa9fb430b76d050fcd31b93e3
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('request_duration_seconds', duration, tags: tags)
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('exceptions_total', tags: { exception: e.class.name })
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.1
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: 2021-11-14 00:00:00.000000000 Z
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: '0'
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: '0'
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: request_duration_seconds (histogram), requests_total
29
- (counter), and exceptions_total (counter).'
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.2.22
56
+ rubygems_version: 3.4.10
57
57
  signing_key:
58
58
  specification_version: 4
59
59
  summary: StatsD instrumentation for Rack servers