event_tracer 0.4.3 → 0.4.6

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: f13a5619d77a274784538f42abb8121d19f91fc24f4d2def934e9430aa232410
4
- data.tar.gz: f281a954af8e3d1e38fc6640ca9ca971ae46b2ea567f80b6d569a4e432fe117f
3
+ metadata.gz: 64dde68b086b57c4b676d62613a5a36be4fa5c754ccb4acd167aa5e69b4247d8
4
+ data.tar.gz: '083bca3d0a990b4d0ac49a20935c6d160b4880604fdeb48bb050720f1713820f'
5
5
  SHA512:
6
- metadata.gz: f24211641d5b8f3ae7e6006122b2f8dc3af0403249e8149dcc64caf479d07cf6b7d96aae8ae7295a048935c1a9b38fa769a2f1ea6cdce2243f8a0bb7bea90cbe
7
- data.tar.gz: c5c85f05628fbeb39878f2ba9dd04a87fb0d02f284f09b827cedf69454154d7a8db0d3d224d85456d01c4152f28d661bf4d5eda7ec9d943ed2d756e38611cf6f
6
+ metadata.gz: 68f56c5bab8b095372ee8dbbe993eb08d9c1692acf7774e3c003abcebb8ac07093eddabb79012c9a6abbb42662da626d4b69ad11221616a6dcebd012c56fb868
7
+ data.tar.gz: ec619f4d64f70a81371063a0ac3ec2fa6666db0030b3af45b364b01de6664757c9824ac010179eeb3af147eb9b2fbd48acc53a3094926891199613ba31d2826a
@@ -43,8 +43,9 @@ module EventTracer
43
43
  end
44
44
  when Hash
45
45
  metrics.each do |metric_name, metric_payload|
46
- metric_type = SUPPORTED_METRIC_TYPES[metric_payload.fetch(:type).to_sym]
47
- appsignal.public_send(metric_type, metric_name, metric_payload.fetch(:value), tags) if metric_type
46
+ payload = metric_payload.transform_keys(&:to_sym)
47
+ metric_type = SUPPORTED_METRIC_TYPES[payload.fetch(:type).to_sym]
48
+ appsignal.public_send(metric_type, metric_name, payload.fetch(:value), tags) if metric_type
48
49
  end
49
50
  end
50
51
 
@@ -1,14 +1,24 @@
1
1
  require 'dry-configurable'
2
+ require 'dry/configurable/version'
2
3
 
3
4
  module EventTracer
4
5
  class Config
5
6
  extend Dry::Configurable
6
7
 
7
- setting :app_name, default: 'app_name'
8
+ if Dry::Configurable::VERSION >= "0.13"
9
+ setting :app_name, default: 'app_name'
8
10
 
9
- # TODO: switch to namespace in v1.0
10
- setting :dynamo_db_table_name, default: 'logs'
11
- setting :dynamo_db_client
12
- setting :dynamo_db_queue_name, default: 'low'
11
+ # TODO: switch to namespace in v1.0
12
+ setting :dynamo_db_table_name, default: 'logs'
13
+ setting :dynamo_db_client
14
+ setting :dynamo_db_queue_name, default: 'low'
15
+ else
16
+ setting :app_name, 'app_name'
17
+
18
+ # TODO: switch to namespace in v1.0
19
+ setting :dynamo_db_table_name, 'logs'
20
+ setting :dynamo_db_client
21
+ setting :dynamo_db_queue_name, 'low'
22
+ end
13
23
  end
14
24
  end
@@ -45,8 +45,9 @@ module EventTracer
45
45
  end
46
46
  when Hash
47
47
  metrics.each do |metric_name, metric_payload|
48
- metric_type = SUPPORTED_METRIC_TYPES[metric_payload.fetch(:type).to_sym]
49
- datadog.public_send(metric_type, metric_name, metric_payload.fetch(:value), tags: tags) if metric_type
48
+ payload = metric_payload.transform_keys(&:to_sym)
49
+ metric_type = SUPPORTED_METRIC_TYPES[payload.fetch(:type).to_sym]
50
+ datadog.public_send(metric_type, metric_name, payload.fetch(:value), tags: tags) if metric_type
50
51
  end
51
52
  end
52
53
 
@@ -1,3 +1,3 @@
1
1
  module EventTracer
2
- VERSION = '0.4.3'.freeze
2
+ VERSION = '0.4.6'.freeze
3
3
  end
data/lib/event_tracer.rb CHANGED
@@ -3,7 +3,7 @@ require 'event_tracer/log_result'
3
3
 
4
4
  module EventTracer
5
5
 
6
- LOG_TYPES = %i(info warn error)
6
+ LOG_TYPES = %i(debug info warn error)
7
7
 
8
8
  @loggers = {}
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_tracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - melvrickgoh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-27 00:00:00.000000000 Z
11
+ date: 2022-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby