sapience 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/sapience/extensions/action_controller/log_subscriber.rb +5 -0
- data/lib/sapience/rails.rb +3 -0
- data/lib/sapience/version.rb +1 -1
- data/test_apps/grape/gemfiles/grape_0.16.2.gemfile.lock +1 -1
- data/test_apps/grape/gemfiles/grape_0.17.0.gemfile.lock +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8871cf69022d9ff3149b7365490b4e135218fc3
|
4
|
+
data.tar.gz: eb2a68c943faafa55ad1e0484c467f3c22b322d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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=
|
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,
|
data/lib/sapience/rails.rb
CHANGED
@@ -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
|
|
data/lib/sapience/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2016-09-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby
|