yabeda-cloudwatch 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +5 -0
- data/README.md +2 -2
- data/Rakefile +3 -7
- data/lib/yabeda/cloudwatch/adapter.rb +6 -6
- data/lib/yabeda/cloudwatch/version.rb +1 -1
- data/yabeda-cloudwatch.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d3095d52f7abd0b17d606a82fb4e4e7f32922e1b8734d13929a4fe18a41a5d2
|
4
|
+
data.tar.gz: 803fa0b4f3181e81a94bd80729b96f9586d7f624500d820b8447f05c80958764
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a638f40684c7946d3a13218310f08cd95aa012962930c7290f5ce8c24a09a0b93e6eb1d3145d76d9600fd700533c14f51653926ac5c1974917c1f78a42ea7a2
|
7
|
+
data.tar.gz: '06892b48b26a0b28282dd822ad106a6b45d0700c599ebbe86da7b6b2859d3893492f70bb542ae23ae1e19932f3d4be63e376cdff2c63540b3bc7c0817bb6a877'
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,11 @@ 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.1.12- 2023-01-31
|
9
|
+
|
10
|
+
- Improve specs. @retsef
|
11
|
+
- Update cloudwatch adapter to send string :namespace and :metric_name instead of symbol. @retsef
|
12
|
+
|
8
13
|
## 0.1.1 - 2023-01-28
|
9
14
|
|
10
15
|
- Update spec. @retsef
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@ And then execute:
|
|
21
21
|
Add adapter to existing Yabeda config
|
22
22
|
|
23
23
|
```ruby
|
24
|
-
client = Aws::
|
24
|
+
client = Aws::CloudWatch::Client.new(
|
25
25
|
credentials: Aws::Credentials.new("project_access_key_id", "project_secret_access_key"),
|
26
26
|
region: 'eu-west-1'
|
27
27
|
)
|
@@ -46,7 +46,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
46
46
|
|
47
47
|
## Contributing
|
48
48
|
|
49
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/yabeda-rb/yabeda-
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/yabeda-rb/yabeda-cloudwatch.
|
50
50
|
|
51
51
|
### Releasing
|
52
52
|
|
data/Rakefile
CHANGED
@@ -1,16 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'bundler/gem_tasks'
|
4
|
-
require '
|
4
|
+
require 'rspec/core/rake_task'
|
5
5
|
|
6
|
-
|
7
|
-
t.libs << 'test'
|
8
|
-
t.libs << 'lib'
|
9
|
-
t.test_files = FileList['test/**/test_*.rb']
|
10
|
-
end
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
11
7
|
|
12
8
|
require 'rubocop/rake_task'
|
13
9
|
|
14
10
|
RuboCop::RakeTask.new
|
15
11
|
|
16
|
-
task default: %i[
|
12
|
+
task default: %i[spec rubocop]
|
@@ -19,12 +19,12 @@ module Yabeda
|
|
19
19
|
|
20
20
|
def perform_counter_increment!(counter, tags, increment)
|
21
21
|
connection.put_metric_data(
|
22
|
-
namespace: counter.group,
|
22
|
+
namespace: counter.group.to_s,
|
23
23
|
metric_data: [
|
24
24
|
{
|
25
25
|
metric_name: counter.name.to_s,
|
26
26
|
timestamp: Time.now,
|
27
|
-
dimensions: tags.map { |tag_name, tag_value| { name: tag_name, value: tag_value } },
|
27
|
+
dimensions: tags.map { |tag_name, tag_value| { name: tag_name.to_s, value: tag_value } },
|
28
28
|
unit: counter.unit || 'Count',
|
29
29
|
value: increment,
|
30
30
|
},
|
@@ -38,12 +38,12 @@ module Yabeda
|
|
38
38
|
|
39
39
|
def perform_gauge_set!(gauge, tags, value)
|
40
40
|
connection.put_metric_data(
|
41
|
-
namespace: gauge.group,
|
41
|
+
namespace: gauge.group.to_s,
|
42
42
|
metric_data: [
|
43
43
|
{
|
44
44
|
metric_name: gauge.name.to_s,
|
45
45
|
timestamp: Time.now,
|
46
|
-
dimensions: tags.map { |tag_name, tag_value| { name: tag_name, value: tag_value } },
|
46
|
+
dimensions: tags.map { |tag_name, tag_value| { name: tag_name.to_s, value: tag_value } },
|
47
47
|
unit: gauge.unit || 'Count',
|
48
48
|
value: value,
|
49
49
|
},
|
@@ -57,12 +57,12 @@ module Yabeda
|
|
57
57
|
|
58
58
|
def perform_histogram_measure!(histogram, tags, value)
|
59
59
|
connection.put_metric_data(
|
60
|
-
namespace: histogram.group,
|
60
|
+
namespace: histogram.group.to_s,
|
61
61
|
metric_data: [
|
62
62
|
{
|
63
63
|
metric_name: histogram.name.to_s,
|
64
64
|
timestamp: Time.now,
|
65
|
-
dimensions: tags.map { |tag_name, tag_value| { name: tag_name, value: tag_value } },
|
65
|
+
dimensions: tags.map { |tag_name, tag_value| { name: tag_name.to_s, value: tag_value } },
|
66
66
|
unit: histogram.unit || 'Seconds',
|
67
67
|
value: value,
|
68
68
|
},
|
data/yabeda-cloudwatch.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yabeda-cloudwatch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Scinocca
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-cloudwatch
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rack
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: yabeda
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|