redis_prometheus 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/redis_prometheus/middleware.rb +2 -2
- data/lib/redis_prometheus/version.rb +1 -1
- data/lib/redis_prometheus.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 75e9c46488f952d2c812d23091b0404dbb42b8da00fea580a6bd89729ecc66b4
|
4
|
+
data.tar.gz: 961d40f0a53973bbcbbb5c4a00b8ea5ff74d3327ee4f9fba870353ff9ab7a4a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be7b4f411e263adae747c2f31febec8f5ce780c2047906da68d440be85261f1d534873b26c5791027e0962df6ec3d164c7ab5745526ff4f1f15262b792d9643f
|
7
|
+
data.tar.gz: f98882fa04252ec55f27ae3f5f5950d5695c0da15adf5034db029277d4f20d55c44f6596b37832279ecac5c9c2fea8fd26b143a52b6350409ec682a25434cb07
|
@@ -47,7 +47,7 @@ module RedisPrometheus
|
|
47
47
|
end
|
48
48
|
data[:service] = ENV["REDIS_PROMETHEUS_SERVICE"]
|
49
49
|
|
50
|
-
next if Rails.application.config.redis_prometheus.ignored_urls.include?(data[:url])
|
50
|
+
next if defined?(Rails) && Rails.application.config.redis_prometheus.ignored_urls.include?(data[:url])
|
51
51
|
|
52
52
|
response << "http_request_duration_seconds_bucket{"
|
53
53
|
response << data.map {|k,v| "#{k}=\"#{v}\""}.join(",")
|
@@ -97,7 +97,7 @@ module RedisPrometheus
|
|
97
97
|
|
98
98
|
def record(env, code, duration)
|
99
99
|
url = "#{env["SCRIPT_NAME"]}#{env["PATH_INFO"]}"
|
100
|
-
return if Rails.application.config.redis_prometheus.ignored_urls.include?(url)
|
100
|
+
return if defined?(Rails) && Rails.application.config.redis_prometheus.ignored_urls.include?(url)
|
101
101
|
|
102
102
|
url.gsub!(%r{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}}i, "{uuid}")
|
103
103
|
url.gsub!(%r{/\b\d+\b}i, "{id}")
|
data/lib/redis_prometheus.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis_prometheus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -93,8 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
|
-
|
97
|
-
rubygems_version: 2.6.13
|
96
|
+
rubygems_version: 3.0.1
|
98
97
|
signing_key:
|
99
98
|
specification_version: 4
|
100
99
|
summary: Capture and serve rack statistics for Prometheus in Redis
|