sapience 0.2.10 → 0.2.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98f00143772d0510186a172e36e87bb13713ac64
4
- data.tar.gz: db51c9f9bd7f28b7904111541f418156736565b5
3
+ metadata.gz: c8871cf69022d9ff3149b7365490b4e135218fc3
4
+ data.tar.gz: eb2a68c943faafa55ad1e0484c467f3c22b322d1
5
5
  SHA512:
6
- metadata.gz: 01415ae790c0a931884bd9928dbdf1e4be110db7139f848122e60606a9fd26070a9cc92fb2cae6ed6952b8d352e44c07e442b8a7c421eb30dd79389137eec633
7
- data.tar.gz: b8de21f789436e326d65c16a1b5f45a6d0f57a6a672947ca039f202ca27aa7acb8aeeab20b0f975f21edebefb1e105e834e62d8dbca4f487975a0348aa7033c9
6
+ metadata.gz: e87b80dd58980acd7392a48124ab1e1cd3281972a86c9f84bcb2639f811ede2b17becfcadcd2e6b476caeba54fad36f42bb71ee0036adac2aeb1969897bbb9f1
7
+ data.tar.gz: 6305d2f76fa22bfea80147d1f10973e6151ec632c9c658d45e9c600b3cf802a05a23b4cc8bd25ea668c6fc5c6796f7eb630a58177f2a89c51e01508160fbc4f2
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Hasslefree autoconfiguration for logging, metrics and exception collection.**
4
4
 
5
- [![Build Status](https://travis-ci.org/reevoo/sapience-rb.svg?branch=TECH-4%2FConfiguration-DSL)](https://travis-ci.org/reevoo/sapience-rb)[![Code Climate](https://codeclimate.com/github/reevoo/sapience-rb/badges/gpa.svg)](https://codeclimate.com/github/reevoo/sapience-rb)[![Test Coverage](https://codeclimate.com/github/reevoo/sapience-rb/badges/coverage.svg)](https://codeclimate.com/github/reevoo/sapience-rb/coverage)[![Issue Count](https://codeclimate.com/github/reevoo/sapience-rb/badges/issue_count.svg)](https://codeclimate.com/github/reevoo/sapience-rb)
5
+ [![Build Status](https://travis-ci.org/reevoo/sapience-rb.svg?branch=master)](https://travis-ci.org/reevoo/sapience-rb)[![Code Climate](https://codeclimate.com/github/reevoo/sapience-rb/badges/gpa.svg)](https://codeclimate.com/github/reevoo/sapience-rb)[![Test Coverage](https://codeclimate.com/github/reevoo/sapience-rb/badges/coverage.svg)](https://codeclimate.com/github/reevoo/sapience-rb/coverage)[![Issue Count](https://codeclimate.com/github/reevoo/sapience-rb/badges/issue_count.svg)](https://codeclimate.com/github/reevoo/sapience-rb)
6
6
 
7
7
  ## Background
8
8
 
@@ -15,6 +15,7 @@ module Sapience
15
15
  def process_action(event) # rubocop:disable AbcSize, CyclomaticComplexity, PerceivedComplexity
16
16
  return unless logger.info?
17
17
  data = request(event.payload)
18
+ data.merge! request_id(event)
18
19
  data.merge! runtimes(event)
19
20
  data.merge! exception(event.payload)
20
21
  info(data)
@@ -46,6 +47,10 @@ module Sapience
46
47
  end
47
48
  end
48
49
 
50
+ def request_id(event)
51
+ { request_id: event.transaction_id }
52
+ end
53
+
49
54
  def runtimes(event)
50
55
  {
51
56
  total: event.duration,
@@ -35,6 +35,9 @@ module Sapience
35
35
  # Replace the Sidekiq logger
36
36
  Sidekiq::Logging.logger = Sapience[Sidekiq] if defined?(Sidekiq)
37
37
 
38
+ # Replace the Sequel logger
39
+ Sequel::Database.logger = Sapience[Sequel] if defined?(Sequel::Database)
40
+
38
41
  # Replace the Sidetiq logger
39
42
  Sidetiq.logger = Sapience[Sidetiq] if defined?(Sidetiq)
40
43
 
@@ -1,3 +1,3 @@
1
1
  module Sapience
2
- VERSION = "0.2.10"
2
+ VERSION = "0.2.11"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../..
3
3
  specs:
4
- sapience (0.2.9)
4
+ sapience (0.2.8)
5
5
  concurrent-ruby (~> 1.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../..
3
3
  specs:
4
- sapience (0.2.9)
4
+ sapience (0.2.8)
5
5
  concurrent-ruby (~> 1.0)
6
6
 
7
7
  GEM
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sapience
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-13 00:00:00.000000000 Z
12
+ date: 2016-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby