prometheus-client 0.7.0.pre.rc.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/prometheus/client/metric.rb +9 -5
- data/lib/prometheus/client/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3b403c4fdba66e5d98a0711753302b50555ce38
|
4
|
+
data.tar.gz: 2399243aa639a5673fb284db4d09d94fef4c0e9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d76c69247147efb11542f9fadc377f63893db094f6a2fd13399d7bdf0172669f4aa6d86a595d04ef3e24db28a5eb2be35c7ee57f7a93a91cf0281b86192ce28
|
7
|
+
data.tar.gz: 3c54b607f85d9464701f3c8a32bc526e5747190e8f1e0c9f75ca7a5f75808498d54bc7243e1086a32fb010275b8dd39f6b152661df26b59a0b9f287c703196a4
|
@@ -46,9 +46,13 @@ module Prometheus
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def validate_name(name)
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
unless name.is_a?(Symbol)
|
50
|
+
raise ArgumentError, 'metric name must be a symbol'
|
51
|
+
end
|
52
|
+
unless name.to_s =~ /\A[a-zA-Z_:][a-zA-Z0-9_:]*\Z/
|
53
|
+
msg = 'metric name must match /[a-zA-Z_:][a-zA-Z0-9_:]*/'
|
54
|
+
raise ArgumentError, msg
|
55
|
+
end
|
52
56
|
end
|
53
57
|
|
54
58
|
def validate_docstring(docstring)
|
@@ -61,8 +65,8 @@ module Prometheus
|
|
61
65
|
@validator.validate(labels)
|
62
66
|
end
|
63
67
|
|
64
|
-
def synchronize
|
65
|
-
@mutex.synchronize
|
68
|
+
def synchronize
|
69
|
+
@mutex.synchronize { yield }
|
66
70
|
end
|
67
71
|
end
|
68
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prometheus-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.0
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schmidt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: quantile
|
@@ -61,12 +61,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
61
61
|
version: '0'
|
62
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- - "
|
64
|
+
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
66
|
+
version: '0'
|
67
67
|
requirements: []
|
68
68
|
rubyforge_project:
|
69
|
-
rubygems_version: 2.6.
|
69
|
+
rubygems_version: 2.6.11
|
70
70
|
signing_key:
|
71
71
|
specification_version: 4
|
72
72
|
summary: A suite of instrumentation metric primitivesthat can be exposed through a
|