cloudwatch-metrics 1.1.0 → 1.1.1

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: fb532d3ef368646603acb0246884a36c398dd42b8bcd17cfe9aad3c69dabe8b4
4
- data.tar.gz: b3f06ecce07db061df5d992eb847c82ae28ff704f4649d5f6bdd8bc720519c3f
3
+ metadata.gz: aae5940338cdbe6a8908f6330531daa21de3bebe3c63a84e5c8c30fbace3413e
4
+ data.tar.gz: 15cf0039191265a80066547276459f60f584bfd70924574b0719d65838b13bc3
5
5
  SHA512:
6
- metadata.gz: 39104d7d1796b1fd74a65ad98df38f81f84d635370d71aefb27bc851de97543b07061efa4a51ddb7468bc3190305517dde60f251d383e24a03e9abfadfc59931
7
- data.tar.gz: ba0a2202fde50efd5fe08e3cd641653901955281b60b30d4a9dbca488268183c3f2520b3dcf265cb7afb69213292f36b72c113b9680afa6a745c84d007505ac0
6
+ metadata.gz: 7c0a974cd1dd8a00473fabefa3be9721f0ce08ca832791c0e7fc764baf3d3111177d64583e30e822473392f746e5afb52a2908586d8ee87b39238283d9509556
7
+ data.tar.gz: 021f06249687423051df6bc8f0adf113be020666fa0b3184b16e36bb4c174d1333c4eb90043e2b9318b626f994b4fcb75a8514ec0715c439466ea18078fe99b6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cloudwatch-metrics (1.0.0)
4
+ cloudwatch-metrics (1.1.1)
5
5
  activesupport (~> 7.0)
6
6
  aws-sdk-cloudwatch (~> 1.73)
7
7
  rake (~> 13.0)
@@ -16,7 +16,7 @@ GEM
16
16
  tzinfo (~> 2.0)
17
17
  ast (2.4.2)
18
18
  aws-eventstream (1.2.0)
19
- aws-partitions (1.780.0)
19
+ aws-partitions (1.781.0)
20
20
  aws-sdk-cloudwatch (1.75.0)
21
21
  aws-sdk-core (~> 3, >= 3.174.0)
22
22
  aws-sigv4 (~> 1.1)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CloudwatchMetrics
4
- VERSION = '1.1.0'
4
+ VERSION = '1.1.1'
5
5
  end
@@ -45,6 +45,8 @@ module CloudwatchMetrics
45
45
  timestamp: timestamp
46
46
  }]
47
47
  put_data(namespace: full_namespace(namespace), metric_data: metric_data)
48
+ rescue StandardError => e
49
+ handle_error(e)
48
50
  end
49
51
 
50
52
  def record_all(
@@ -59,6 +61,8 @@ module CloudwatchMetrics
59
61
  timestamp: timestamp
60
62
  }]
61
63
  put_data(namespace: full_namespace(namespace), metric_data: metric_data)
64
+ rescue StandardError => e
65
+ handle_error(e)
62
66
  end
63
67
 
64
68
  private
@@ -71,8 +75,6 @@ module CloudwatchMetrics
71
75
  end
72
76
 
73
77
  nil
74
- rescue StandardError => e
75
- handle_error(e)
76
78
  end
77
79
 
78
80
  def cloudwatch_client
@@ -116,7 +118,7 @@ module CloudwatchMetrics
116
118
 
117
119
  def full_namespace(provided_namespace)
118
120
  constructed_namespace = provided_namespace || configuration.namespace
119
- raise CloudwatchMetrics::Error, 'Namespace must be provided' if constructed_namespace.nil?
121
+ raise CloudwatchMetrics::Error, 'Namespace must be provided' if constructed_namespace.blank?
120
122
 
121
123
  if environment != 'production' && configuration.non_production_prefix.present?
122
124
  constructed_namespace = configuration.non_production_prefix + constructed_namespace
@@ -35,7 +35,7 @@ CloudwatchMetrics.configure do |config|
35
35
 
36
36
  # This is an optional configuration to set the namespace prefix for non-production
37
37
  # environments. This is useful if you want to avoid polluting your production
38
- # metrics with test data. Defaults to 'test-'.
38
+ # metrics with test data. If empty or nil no prefix will be applied. Defaults to 'test-'.
39
39
  # config.non_production_prefix = 'test-'
40
40
 
41
41
  # This is an optional configuration to set an error handler proc.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudwatch-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Puckett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-20 00:00:00.000000000 Z
11
+ date: 2023-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport