yabeda 0.1.3 → 0.2.0

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: a3a3991d4dbb2b060ba55ad682d20eb14012c8fb674cebc335e36ae5c0ab8067
4
- data.tar.gz: 56190b3fae34f414ba1afa58ec0ffc05ca36ee7c5f5209148b64a7a7a9936197
3
+ metadata.gz: fce95ac4969384292f6a3151b1aebb3c1affc3a41317f6e9c30543de90e50146
4
+ data.tar.gz: f1df0f753c8530166727ec53f7fe227f5fa67cafe39fe42d04309632981d0c47
5
5
  SHA512:
6
- metadata.gz: def5c6a2dfaf0bff0b17aadb9af664fc5b36427c1b52eff208afc7a43f275691a32d3c2cea2c19c2abd5643339a788f78b7f30f9294a8c882897abd57d060bee
7
- data.tar.gz: 3548e381cf4b1b2fefe93d0211887e040022d02f4fbfc3a23f6404407bdb82e5b5a951a446d461a333978e5892054921593c4ea4a43de956ecefecf121408c0f
6
+ metadata.gz: 616b4376b04364a5e6e6c88b9c8b763dbaf02dd304a611fde4968a06be43c2773b6a9b6f6aac4e3629a0481cd5aa81b1ca731b1ecc5118970a1c1f0f0c2ad7d3
7
+ data.tar.gz: 1ee600f68346abc63dfc2dbc66d52a169584b43005db91f5fd952accf836b66ffcee478d95cb37ffa81bb4921769aeb7f04e0bbeb329c073064ed290de1808c0
@@ -3,7 +3,8 @@ sudo: false
3
3
  language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
- - 2.5.3
7
- - 2.4.5
8
- - 2.3.8
9
- before_install: gem install bundler -v 1.17.0
6
+ - 2.7.0
7
+ - 2.6.5
8
+ - 2.5.7
9
+ - 2.4.9
10
+ before_install: gem install bundler -v "~> 2.0"
@@ -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
- your_app_whistles_active.set({}, Whistle.where(state: :active).count
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 => error
25
- raise ConfigurationError, "#{error.message} for #{metric_klass.name}"
24
+ rescue KeyError => e
25
+ raise ConfigurationError, "#{e.message} for #{metric_klass.name}"
26
26
  end
27
27
  end
28
28
  end
@@ -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"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yabeda
4
- VERSION = "0.1.3"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -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", "~> 1.16"
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.1.3
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: 2018-12-18 00:00:00.000000000 Z
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: '1.16'
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: '1.16'
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. Export
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
- rubyforge_project:
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