prometheus_exporter 2.0.4 → 2.0.6

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: f4f6fca67df8cdcd10a86edb00a89cc61a807af54f80794a6573bea5a8805bc0
4
- data.tar.gz: 66e4867922235be2bb18df90b8ecbf3ad6b3d08d4ad92f62219ea26d80ca2515
3
+ metadata.gz: 2a7a452c5d92b7dbaca7f68ae2fa0553b5e280cd0b194f8ad0914d1e372c6b54
4
+ data.tar.gz: fdb40f93499fbc98cf4b94b2f52864fa1581df70b0dac448e06d8ebbf357f6f5
5
5
  SHA512:
6
- metadata.gz: 7a31e11d9ba63709048ccebe7352f636f601800dd19d00aa3e29448a22d1e0de6436882d32ecb2e5911e16df0409acf1b1fb71d351f67afd38b3fb6e39976099
7
- data.tar.gz: ba2c7fb01384299fa8f16656dd106ba99e82c721aca7d6442cd8f8a19a0b0ce82ff2b39935eeb0d8e19c096e5436c564ee1defe813dcf93bd3c41e6c0fc8dedc
6
+ metadata.gz: 55eb9c1051984906ee30be3cbb2a9d4c3cb0c5f2fe58c9da0178b48187beb940a8314677052cf6b29bb0c2e5d6d364de30b36a32b56eb061065d48feab01e903
7
+ data.tar.gz: 794b19bab0a66404058ca2d550659d2fbca891e894a5b234db974eefc6b0652475c94d607b0be0b0f84f8d786bebf0a5b6d8721408c7e79ef18f031cd8466446
data/CHANGELOG CHANGED
@@ -1,3 +1,12 @@
1
+ 2.0.6 - 2022-11-22
2
+
3
+ - FIX: use user specified labels over default in merge conflict
4
+ - FIX: sidekiq stats collector memory leak
5
+
6
+ 2.0.5 - 2022-11-15
7
+
8
+ - FIX: regression :prepend style instrumentation not working correctly
9
+
1
10
  2.0.4 - 2022-11-10
2
11
 
3
12
  - FIX/FEATURE: support for Redis 5 gem instrumentation
@@ -64,9 +64,9 @@ class PrometheusExporter::Instrumentation::MethodProfiler
64
64
  end
65
65
 
66
66
  def self.patch_using_prepend(klass, methods, name)
67
- prepend_instument = Module.new
68
- define_methods_on_module(klass, methods, name)
69
- klass.prepend(prepend_instument)
67
+ prepend_instrument = Module.new
68
+ define_methods_on_module(prepend_instrument, methods, name)
69
+ klass.prepend(prepend_instrument)
70
70
  end
71
71
 
72
72
  def self.patch_using_alias_method(klass, methods, name)
@@ -75,7 +75,7 @@ module PrometheusExporter::Metric
75
75
  end
76
76
 
77
77
  def labels_text(labels)
78
- labels = (labels || {}).merge(Base.default_labels)
78
+ labels = Base.default_labels.merge(labels || {})
79
79
  if labels && labels.length > 0
80
80
  s = labels.map do |key, value|
81
81
  value = value.to_s
@@ -40,6 +40,9 @@ module PrometheusExporter::Server
40
40
  end
41
41
 
42
42
  def collect(object)
43
+ now = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC)
44
+ object['created_at'] = now
45
+ sidekiq_metrics.delete_if { |metric| metric['created_at'] + MAX_SIDEKIQ_METRIC_AGE < now }
43
46
  sidekiq_metrics << object
44
47
  end
45
48
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PrometheusExporter
4
- VERSION = '2.0.4'
4
+ VERSION = '2.0.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prometheus_exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-10 00:00:00.000000000 Z
11
+ date: 2022-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webrick