yabeda 0.13.1 → 0.14.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/.github/workflows/test.yml +4 -0
- data/CHANGELOG.md +26 -0
- data/README.md +14 -1
- data/lib/yabeda/dsl/class_methods.rb +17 -2
- data/lib/yabeda/rspec/base_matcher.rb +1 -1
- data/lib/yabeda/rspec/increment_yabeda_counter.rb +1 -1
- data/lib/yabeda/rspec/measure_yabeda_histogram.rb +1 -0
- data/lib/yabeda/rspec/observe_yabeda_summary.rb +1 -0
- data/lib/yabeda/rspec/update_yabeda_gauge.rb +1 -0
- data/lib/yabeda/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbfcaaa322333f0bf774953f4ef40081a43f3d8dc89a3aec426397c174f8e5ef
|
4
|
+
data.tar.gz: 4f4dd1f0fc20cf59b72c26308861dfc7b439d271cdaebcd8441190a419e3b3e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d43a6452648112c376b29dce66942ad6a491f4b0d54794cd42f5dd874d8db7c005f3e65d883707b53a6bbc4ffc8f961526a8c757acb877e89239d527d5205b4b
|
7
|
+
data.tar.gz: c42902e5e1b7f410170f7dfec0594de246ec5aebaa989b33786cec835cfaa5e99308155b35f906e4bf495589c3d0b03c1cc40fcaa88ddb59b43b1abc5ce187e4
|
data/.github/workflows/test.yml
CHANGED
@@ -14,10 +14,14 @@ jobs:
|
|
14
14
|
# Skip running tests for local pull requests (use push event instead), run only for foreign ones
|
15
15
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login
|
16
16
|
runs-on: ubuntu-latest
|
17
|
+
continue-on-error: ${{ matrix.optional || false }}
|
17
18
|
strategy:
|
18
19
|
fail-fast: false
|
19
20
|
matrix:
|
20
21
|
include:
|
22
|
+
- ruby: head
|
23
|
+
optional: true
|
24
|
+
- ruby: "3.4"
|
21
25
|
- ruby: "3.3"
|
22
26
|
- ruby: "3.2"
|
23
27
|
- ruby: "3.1"
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
7
7
|
|
8
8
|
## Unreleased
|
9
9
|
|
10
|
+
## 0.14.0 - 2025-09-10
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- Allow to limit groups per adapter. [@killondark][] in [#41](https://github.com/yabeda-rb/yabeda/pull/41)
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
Yabeda.configure do
|
18
|
+
group :mushrooms do
|
19
|
+
counter :champignon_counter
|
20
|
+
end
|
21
|
+
|
22
|
+
adapter :basket_adapter do
|
23
|
+
include_group :mushrooms
|
24
|
+
end
|
25
|
+
end
|
26
|
+
```
|
27
|
+
|
28
|
+
## 0.13.2 - 2025-09-09
|
29
|
+
|
30
|
+
### Fixed
|
31
|
+
|
32
|
+
- Fix false positives of rspec matchers [@jbockler][] in [#42](https://github.com/yabeda-rb/yabeda/pull/42)
|
33
|
+
|
10
34
|
## 0.13.1 - 2024-10-11
|
11
35
|
|
12
36
|
### Fixed
|
@@ -189,3 +213,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
189
213
|
[@liaden]: https://github.com/liaden "Joel Johnson"
|
190
214
|
[@bibendi]: https://github.com/bibendi "Misha Merkushin"
|
191
215
|
[@Keallar]: https://github.com/Keallar "Eugene Lysanskiy"
|
216
|
+
[@jbockler]: https://github.com/jbockler "Josch Bockler"
|
217
|
+
[@killondark]: https://github.com/killondark "Alexander Marychev"
|
data/README.md
CHANGED
@@ -120,7 +120,7 @@ And then execute:
|
|
120
120
|
|
121
121
|
- Prometheus:
|
122
122
|
- [yabeda-prometheus](https://github.com/yabeda-rb/yabeda-prometheus) — wraps [official Ruby client for Prometheus](https://github.com/prometheus/client_ruby).
|
123
|
-
- [yabeda-prometheus-mmap](https://github.com/yabeda-rb/yabeda-prometheus-mmap) — wraps [GitLab's fork of Prometheus Ruby client](https://gitlab.com/gitlab-org/prometheus-client-mmap) which may work better for multi-process application servers.
|
123
|
+
- [yabeda-prometheus-mmap](https://github.com/yabeda-rb/yabeda-prometheus-mmap) — wraps [GitLab's fork of Prometheus Ruby client](https://gitlab.com/gitlab-org/ruby/gems/prometheus-client-mmap) which may work better for multi-process application servers.
|
124
124
|
- [Datadog](https://github.com/yabeda-rb/yabeda-datadog)
|
125
125
|
- [NewRelic](https://github.com/yabeda-rb/yabeda-newrelic)
|
126
126
|
|
@@ -246,6 +246,19 @@ Yabeda.configure do
|
|
246
246
|
end
|
247
247
|
```
|
248
248
|
|
249
|
+
Or use another DSL to describe this logic:
|
250
|
+
|
251
|
+
```ruby
|
252
|
+
Yabeda.configure do
|
253
|
+
group :mushrooms do
|
254
|
+
counter :champignon_counter
|
255
|
+
end
|
256
|
+
|
257
|
+
adapter :basket_adapter do
|
258
|
+
include_group :mushrooms
|
259
|
+
end
|
260
|
+
end
|
261
|
+
```
|
249
262
|
|
250
263
|
## Roadmap (aka TODO or Help wanted)
|
251
264
|
|
@@ -96,10 +96,25 @@ module Yabeda
|
|
96
96
|
#
|
97
97
|
# @param adapter_names [Array<Symbol>] Names of adapters to use
|
98
98
|
def adapter(*adapter_names, group: @group)
|
99
|
-
raise ConfigurationError, "Adapter limitation can't be defined
|
99
|
+
raise ConfigurationError, "Adapter limitation can't be defined without adapter_names" if adapter_names.empty?
|
100
|
+
|
101
|
+
@adapter_names = adapter_names
|
102
|
+
if group
|
103
|
+
include_group(group)
|
104
|
+
else
|
105
|
+
return yield if block_given?
|
106
|
+
|
107
|
+
raise ConfigurationError, "Yabeda.adapter should be called either inside group declaration " \
|
108
|
+
"or should have block provided with a call to include_group. No metric group provided."
|
109
|
+
end
|
110
|
+
ensure @adapter_names = nil
|
111
|
+
end
|
112
|
+
|
113
|
+
def include_group(group)
|
114
|
+
raise ConfigurationError, "Adapter limitation can't be defined without of group name" unless group
|
100
115
|
|
101
116
|
Yabeda.groups[group] ||= Yabeda::Group.new(group)
|
102
|
-
Yabeda.groups[group].adapter(
|
117
|
+
Yabeda.groups[group].adapter(*@adapter_names)
|
103
118
|
end
|
104
119
|
|
105
120
|
private
|
@@ -36,7 +36,7 @@ module Yabeda
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# RSpec doesn't define this method, but it is more convenient to rely on +match_when_negated+ method presence
|
39
|
-
def does_not_match?(actual)
|
39
|
+
def does_not_match?(actual) # rubocop:disable Naming/PredicatePrefix
|
40
40
|
@actual = actual
|
41
41
|
if respond_to?(:match_when_negated)
|
42
42
|
match_when_negated(expected, actual)
|
data/lib/yabeda/version.rb
CHANGED
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.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Novikov
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anyway_config
|
@@ -114,7 +114,7 @@ homepage: https://github.com/yabeda-rb/yabeda
|
|
114
114
|
licenses:
|
115
115
|
- MIT
|
116
116
|
metadata: {}
|
117
|
-
post_install_message:
|
117
|
+
post_install_message:
|
118
118
|
rdoc_options: []
|
119
119
|
require_paths:
|
120
120
|
- lib
|
@@ -129,8 +129,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
|
-
rubygems_version: 3.5.
|
133
|
-
signing_key:
|
132
|
+
rubygems_version: 3.5.22
|
133
|
+
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Extensible framework for collecting metric for your Ruby application
|
136
136
|
test_files: []
|