lhc 11.0.0 → 11.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lhc/interceptors/prometheus.rb +9 -3
- data/lib/lhc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa9ef8c17dc9fb8e504c05cf4450903d2a11c736908fd8fc52ba4a177e0889eb
|
4
|
+
data.tar.gz: 070670fea5fd80f93d5a3f30e052f23530274148bbd9c7e9b0d6377aade62bfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5efc110217acc460487147dd3763bfffa17f0c825fb8d52d6d7b40460506ae13ce87b1c5b2f13e776cebc02daddb6510be82e3e04a0313fdfb07d0dc63b916e4
|
7
|
+
data.tar.gz: e3c0a8b6dd47e192f9dab7d2d5f0e1cf197bb289ab62d69bad0daf70791b83a3cfaa7c77f7b2bd70547fe274f1ea43f06687108cf6fad5e212fe1a96d97f0f9f
|
@@ -15,9 +15,15 @@ class LHC::Prometheus < LHC::Interceptor
|
|
15
15
|
def initialize(request)
|
16
16
|
super(request)
|
17
17
|
return if LHC::Prometheus.registered || LHC::Prometheus.client.blank?
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
|
19
|
+
begin
|
20
|
+
LHC::Prometheus.client.registry.counter(LHC::Prometheus::REQUEST_COUNTER_KEY, 'Counter of all LHC requests.')
|
21
|
+
LHC::Prometheus.client.registry.histogram(LHC::Prometheus::REQUEST_HISTOGRAM_KEY, 'Request timings for all LHC requests in seconds.')
|
22
|
+
rescue Prometheus::Client::Registry::AlreadyRegisteredError => e
|
23
|
+
Rails.logger.error(e) if defined?(Rails)
|
24
|
+
ensure
|
25
|
+
LHC::Prometheus.registered = true
|
26
|
+
end
|
21
27
|
end
|
22
28
|
|
23
29
|
def after_response
|
data/lib/lhc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.0.
|
4
|
+
version: 11.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/local-ch/lhc/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|