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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b98d689381652202d5204b16f76d5171c7650362ed047d733447f04de02dbac5
4
- data.tar.gz: cb43cb26d090cb3e387e9e1b17ece3c96a7aab2b07fb54592f1a594af0dd3d6a
3
+ metadata.gz: aa9ef8c17dc9fb8e504c05cf4450903d2a11c736908fd8fc52ba4a177e0889eb
4
+ data.tar.gz: 070670fea5fd80f93d5a3f30e052f23530274148bbd9c7e9b0d6377aade62bfd
5
5
  SHA512:
6
- metadata.gz: 02d1689b6669a88dee07d03916d8d3972a5733abb577af695509bbe8c867c6357daefc94bb9008205378a0ccfc65f6de7006fcf66f3425e651ebc92b76e1d1bf
7
- data.tar.gz: 4149bfbcb67cd51d4c3743353357d663548a20812035b1d9e051ed9990ca4de73936dff7075db59193113009f8866ccce94a09816bd29942345e2e146cf6f2c9
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
- LHC::Prometheus.client.registry.counter(LHC::Prometheus::REQUEST_COUNTER_KEY, 'Counter of all LHC requests.')
19
- LHC::Prometheus.client.registry.histogram(LHC::Prometheus::REQUEST_HISTOGRAM_KEY, 'Request timings for all LHC requests in seconds.')
20
- LHC::Prometheus.registered = true
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LHC
4
- VERSION ||= '11.0.0'
4
+ VERSION ||= '11.0.1'
5
5
  end
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.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-03 00:00:00.000000000 Z
11
+ date: 2019-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport