zuora_observability 0.1.0.pre.e → 0.1.0.pre.f

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: dcbd6a64b3460c7d1fb1e0c3421cf3d069b7e262f1917f46626781dc65ed7b9c
4
- data.tar.gz: 503c94fd83f0153da289732fd846b217f11cfaef45af2ef45b5446545a258919
3
+ metadata.gz: 3d31b6073ad9e3656c57f437c94ddd5d261f42debb578a6eb480178f458ea571
4
+ data.tar.gz: 919af15470a8e49809c140fa15b55bceccf3512d22f8d3470b72b94a9011649d
5
5
  SHA512:
6
- metadata.gz: d2144fb2fb982c5611e4274eebb6f7eb61f0894205dec5bf43f723a72855dc10aad1243834387d5db4406261c1efe7391f96290a7a0c6b82e8ce3371c2aa241a
7
- data.tar.gz: a3d5d771eeb3eb143bb50ab223e5b643c0e6c1573a7a99f022b0dabdbfb1090d961078011ad44e7c7ba9714ecb94ead7ed0a63170df88685d56fd11d6b44bd17
6
+ metadata.gz: 379c96696127af1384c9d52e322665fcdfcc94a05c645258281b6e823420a314b2bf93629df28f6042bfe869789acea4463c11ee1b8f603db9914b0a1113a80c
7
+ data.tar.gz: c0c74096ef3088cce897ba8d912ac4ba4e8ddec29afb4821ad16bc2be6bc20f9984044413c045f5b26099ac3d7bff86310f46ba03ec183b9baf73ad71d5dda78
data/README.md CHANGED
@@ -2,24 +2,10 @@
2
2
 
3
3
  A ruby gem to enable observability into rails applications
4
4
 
5
- ## Usage
6
-
7
- - [Logging](doc/logging.md)
8
-
9
- ### Configuration
10
-
11
- Observability can be configured through an initializer as shown below.
12
-
13
- ```ruby
14
- # config/initializers/zuora_observability.rb
15
- ZuoraObservability.configure do |config|
16
- config.enable_metrics = true
17
- end
18
- ```
5
+ ## Prerequisites
19
6
 
20
- | Configuration Field | Default Value | Description |
21
- | ------------------- | ---------------------------------------------------------------- | ------------------------------------ |
22
- | `json_logging` | `false` in development/test, `true` otherwise | Use structured JSON logging for ZuoraObservability::Logger. **This configuration option cannot be changed in an initializer, but can be set to `true` with the presence of `ZUORA_JSON_LOGGING` environment variable** |
7
+ - Ruby 2.5+
8
+ - Rails 5.0+
23
9
 
24
10
  ## Installation
25
11
 
@@ -41,6 +27,10 @@ Or install it yourself as:
41
27
  $ gem install zuora_observability
42
28
  ```
43
29
 
30
+ ## Usage
31
+
32
+ - [Logging](doc/logging.md)
33
+
44
34
  ## License
45
35
 
46
36
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,16 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  if defined?(Resque.logger)
4
- Resque.logger = ZuoraObservability::Logger.custom_logger(name: 'Resque', type: 'Monologger', level: MonoLogger::INFO)
4
+ Resque.logger = ZuoraObservability::Logger.custom_logger(name: 'Resque')
5
5
  if defined?(Resque::Scheduler)
6
6
  Resque::Scheduler.logger = ZuoraObservability::Logger.custom_logger(name: 'ResqueScheduler')
7
7
  end
8
8
  end
9
9
 
10
10
  if defined?(Delayed::Worker.logger)
11
- Delayed::Worker.logger = ZuoraObservability::Logger.custom_logger(
12
- name: 'DelayedJob', type: 'Monologger', level: MonoLogger::INFO
13
- )
11
+ Delayed::Worker.logger = ZuoraObservability::Logger.custom_logger(name: 'DelayedJob', level: Logger::INFO)
14
12
  end
15
13
 
16
14
  if defined?(Makara)
@@ -18,9 +16,9 @@ if defined?(Makara)
18
16
  end
19
17
 
20
18
  if defined?(ElasticAPM) && ElasticAPM.running?
21
- ElasticAPM.agent.config.logger = ZuoraObservability::Logger.custom_logger(name: 'ElasticAPM', level: MonoLogger::WARN)
19
+ ElasticAPM.agent.config.logger = ZuoraObservability::Logger.custom_logger(name: 'ElasticAPM', level: Logger::WARN)
22
20
  end
23
21
 
24
22
  if defined?(ActionMailer)
25
- ActionMailer::Base.logger = ZuoraObservability::Logger.custom_logger(name: 'ActionMailer', type: 'Monologger')
23
+ ActionMailer::Base.logger = ZuoraObservability::Logger.custom_logger(name: 'ActionMailer')
26
24
  end
@@ -145,6 +145,7 @@ module ZuoraObservability
145
145
  def base_fields(data)
146
146
  {
147
147
  apartment_id: data[:app_instance_id],
148
+ cp_id: data[:zuora_track_id],
148
149
  environment: data[:environment],
149
150
  tenant_id: data[:tenant_ids],
150
151
  trace_id: data[:zuora_trace_id]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZuoraObservability
4
- VERSION = '0.1.0-e'
4
+ VERSION = '0.1.0-f'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_observability
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.e
4
+ version: 0.1.0.pre.f
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hartley McGuire
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-14 00:00:00.000000000 Z
11
+ date: 2021-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lograge