prometheus_exporter 0.4.10 → 0.4.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -1
- data/CHANGELOG +5 -0
- data/Gemfile +2 -0
- data/Guardfile +2 -0
- data/Rakefile +2 -0
- data/bench/bench.rb +2 -0
- data/bin/prometheus_exporter +1 -0
- data/examples/custom_collector.rb +2 -0
- data/lib/prometheus_exporter/client.rb +1 -1
- data/lib/prometheus_exporter/instrumentation/delayed_job.rb +2 -0
- data/lib/prometheus_exporter/instrumentation/method_profiler.rb +2 -0
- data/lib/prometheus_exporter/instrumentation/puma.rb +4 -2
- data/lib/prometheus_exporter/instrumentation/unicorn.rb +2 -0
- data/lib/prometheus_exporter/instrumentation.rb +2 -0
- data/lib/prometheus_exporter/metric.rb +2 -0
- data/lib/prometheus_exporter/server/collector_base.rb +2 -0
- data/lib/prometheus_exporter/server/delayed_job_collector.rb +2 -0
- data/lib/prometheus_exporter/server/hutch_collector.rb +2 -0
- data/lib/prometheus_exporter/server/puma_collector.rb +2 -0
- data/lib/prometheus_exporter/server/runner.rb +3 -2
- data/lib/prometheus_exporter/server/sidekiq_collector.rb +2 -0
- data/lib/prometheus_exporter/server/type_collector.rb +2 -0
- data/lib/prometheus_exporter/server.rb +2 -0
- data/lib/prometheus_exporter/version.rb +3 -1
- data/lib/prometheus_exporter.rb +2 -0
- data/prometheus_exporter.gemspec +2 -1
- metadata +18 -5
- data/.travis +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3aacb5796a775ab5ed7c872419b7ac5c7726a0117b4e7d7bfc5c5048735b412f
|
4
|
+
data.tar.gz: f32c2d1bb20ce8c0385a9502ca547cb212c84057f7b22c67cd8380ef5e9fcc19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82c365e49940fdcb8e75f1645a96816d0e84157a7dbe8988421e0852f3059d90e7ad54fc5c1ee718665a256b96b2c9e7229a18082666c7275e6620f69f73926f
|
7
|
+
data.tar.gz: 2a703b4d52c22d0a08e7ae0df5f66abed1d2e9487ebbf659bda5feefd9fdb7d61968bae3d634535991ce128c5f1d09095772d8947ea8f4d7694559142e7bdb5c
|
data/.travis.yml
CHANGED
@@ -2,6 +2,11 @@ sudo: required
|
|
2
2
|
language: ruby
|
3
3
|
dist: trusty
|
4
4
|
rvm:
|
5
|
-
- 2.
|
5
|
+
- 2.3
|
6
|
+
- 2.4
|
7
|
+
- 2.5
|
8
|
+
- 2.6
|
6
9
|
before_install: gem install bundler -v 1.16.1
|
7
10
|
before_script: sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
|
11
|
+
|
12
|
+
script: bundle exec rubocop && bundle exec rake
|
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
data/Guardfile
CHANGED
data/Rakefile
CHANGED
data/bench/bench.rb
CHANGED
data/bin/prometheus_exporter
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
2
4
|
|
3
5
|
# collects stats from puma
|
4
6
|
module PrometheusExporter::Instrumentation
|
@@ -30,7 +32,7 @@ module PrometheusExporter::Instrumentation
|
|
30
32
|
def collect_puma_stats(metric)
|
31
33
|
stats = JSON.parse(::Puma.stats)
|
32
34
|
|
33
|
-
if stats.key?
|
35
|
+
if stats.key?("workers")
|
34
36
|
metric[:phase] = stats["phase"]
|
35
37
|
metric[:workers_total] = stats["workers"]
|
36
38
|
metric[:booted_workers_total] = stats["booted_workers"]
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'prometheus_exporter/client'
|
3
4
|
require_relative '../instrumentation/unicorn'
|
4
5
|
|
5
6
|
module PrometheusExporter::Server
|
6
|
-
class RunnerException < StandardError; end
|
7
|
-
class WrongInheritance < RunnerException; end
|
7
|
+
class RunnerException < StandardError; end
|
8
|
+
class WrongInheritance < RunnerException; end
|
8
9
|
|
9
10
|
class Runner
|
10
11
|
def initialize(options = {})
|
data/lib/prometheus_exporter.rb
CHANGED
data/prometheus_exporter.gemspec
CHANGED
@@ -22,7 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = ["prometheus_exporter"]
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.add_development_dependency "
|
25
|
+
spec.add_development_dependency "rubocop", ">= 0.69"
|
26
|
+
spec.add_development_dependency "bundler", "> 1.16"
|
26
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
27
28
|
spec.add_development_dependency "minitest", "~> 5.0"
|
28
29
|
spec.add_development_dependency "guard", "~> 2.0"
|
metadata
CHANGED
@@ -1,27 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prometheus_exporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.69'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.69'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- - "
|
31
|
+
- - ">"
|
18
32
|
- !ruby/object:Gem::Version
|
19
33
|
version: '1.16'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- - "
|
38
|
+
- - ">"
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '1.16'
|
27
41
|
- !ruby/object:Gem::Dependency
|
@@ -146,7 +160,6 @@ extra_rdoc_files: []
|
|
146
160
|
files:
|
147
161
|
- ".gitignore"
|
148
162
|
- ".rubocop.yml"
|
149
|
-
- ".travis"
|
150
163
|
- ".travis.yml"
|
151
164
|
- CHANGELOG
|
152
165
|
- CODE_OF_CONDUCT.md
|