yabeda 0.1.3 → 0.2.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/.travis.yml +5 -4
- data/CHANGELOG.md +7 -0
- data/README.md +2 -2
- data/lib/yabeda/dsl/metric_builder.rb +2 -2
- data/lib/yabeda/metric.rb +1 -0
- data/lib/yabeda/version.rb +1 -1
- data/yabeda.gemspec +1 -1
- metadata +8 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fce95ac4969384292f6a3151b1aebb3c1affc3a41317f6e9c30543de90e50146
|
4
|
+
data.tar.gz: f1df0f753c8530166727ec53f7fe227f5fa67cafe39fe42d04309632981d0c47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 616b4376b04364a5e6e6c88b9c8b763dbaf02dd304a611fde4968a06be43c2773b6a9b6f6aac4e3629a0481cd5aa81b1ca731b1ecc5118970a1c1f0f0c2ad7d3
|
7
|
+
data.tar.gz: 1ee600f68346abc63dfc2dbc66d52a169584b43005db91f5fd952accf836b66ffcee478d95cb37ffa81bb4921769aeb7f04e0bbeb329c073064ed290de1808c0
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## 0.2.0 - 2020-01-14
|
9
|
+
|
10
|
+
### Added
|
11
|
+
|
12
|
+
- Ability to specify an optional list of allowed `tags` as an option to metric declaration. @Envek
|
13
|
+
|
14
|
+
Some monitoring systems clients (like official prometheus client for Ruby) require to declare all possible metric labels upfront.
|
8
15
|
|
9
16
|
## 0.1.3 - 2018-12-18
|
10
17
|
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ And then execute:
|
|
33
33
|
```ruby
|
34
34
|
Yabeda.configure do
|
35
35
|
group :your_app do
|
36
|
-
counter :bells_rang_count, comment: "Total number of bells being rang"
|
36
|
+
counter :bells_rang_count, comment: "Total number of bells being rang", tags: %i[bell_size]
|
37
37
|
gauge :whistles_active, comment: "Number of whistles ready to whistle"
|
38
38
|
histogram :whistle_runtime do
|
39
39
|
comment "How long whistles are being active"
|
@@ -66,7 +66,7 @@ And then execute:
|
|
66
66
|
# (by timer or external request depending on adapter you're using)
|
67
67
|
# Keep it fast and simple!
|
68
68
|
collect do
|
69
|
-
|
69
|
+
your_app.whistles_active.set({}, Whistle.where(state: :active).count)
|
70
70
|
end
|
71
71
|
end
|
72
72
|
```
|
@@ -21,8 +21,8 @@ module Yabeda
|
|
21
21
|
|
22
22
|
def initialize_metric(params, options, group)
|
23
23
|
metric_klass.new(*params, **options, group: group)
|
24
|
-
rescue KeyError =>
|
25
|
-
raise ConfigurationError, "#{
|
24
|
+
rescue KeyError => e
|
25
|
+
raise ConfigurationError, "#{e.message} for #{metric_klass.name}"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
data/lib/yabeda/metric.rb
CHANGED
@@ -9,6 +9,7 @@ module Yabeda
|
|
9
9
|
|
10
10
|
param :name, comment: "Metric name. Use snake_case. E.g. job_runtime"
|
11
11
|
option :comment, optional: true, comment: "Documentation string. Required by some adapters."
|
12
|
+
option :tags, optional: true, comment: "Allowed labels to be set. Required by some adapters."
|
12
13
|
option :unit, optional: true, comment: "In which units it is measured. E.g. `seconds`"
|
13
14
|
option :per, optional: true, comment: "Per which unit is measured `unit`. E.g. `call` as in seconds per call"
|
14
15
|
option :group, optional: true, comment: "Category name for grouping metrics"
|
data/lib/yabeda/version.rb
CHANGED
data/yabeda.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_dependency "concurrent-ruby"
|
29
29
|
spec.add_dependency "dry-initializer"
|
30
30
|
|
31
|
-
spec.add_development_dependency "bundler", "~>
|
31
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
32
32
|
spec.add_development_dependency "rake", "~> 12.0"
|
33
33
|
spec.add_development_dependency "rspec", "~> 3.0"
|
34
34
|
spec.add_development_dependency "yard"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yabeda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Novikov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,10 +108,10 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description: 'Collect statistics about how your application is performing with ease.
|
112
|
-
metrics to various monitoring systems.
|
111
|
+
description: 'Collect statistics about how your application is performing with ease.
|
112
|
+
Export metrics to various monitoring systems.
|
113
113
|
|
114
|
-
'
|
114
|
+
'
|
115
115
|
email:
|
116
116
|
- envek@envek.name
|
117
117
|
executables: []
|
@@ -162,8 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
162
|
- !ruby/object:Gem::Version
|
163
163
|
version: '0'
|
164
164
|
requirements: []
|
165
|
-
|
166
|
-
rubygems_version: 2.7.6
|
165
|
+
rubygems_version: 3.0.3
|
167
166
|
signing_key:
|
168
167
|
specification_version: 4
|
169
168
|
summary: Extensible framework for collecting metric for your Ruby application
|