active_record-tracer 0.1.0 → 0.1.1
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 +4 -4
- data/.gitignore +1 -0
- data/lib/active_record/tracer/processor.rb +11 -2
- data/lib/active_record/tracer/version.rb +1 -1
- metadata +1 -2
- data/Gemfile.lock +0 -81
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6d5d825e88bd7cc190019ef64623f883a79b8c0c
|
|
4
|
+
data.tar.gz: dbbdda4dc2ac808bfa6f3cc95bff15793c134f15
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 33624dde8e8fe48fd1f1b1b2cff8cc156196f962530f77dfb79e13de5d3f4a7531623f42243096a9f282f1c0b1f3af1eec3dc6806ad261a57c3d82bd48a1c713
|
|
7
|
+
data.tar.gz: 58133a52ff53673974a2c47eade04fe599e313ca1cc5c801524f8b9d70bd5dfdb77b5a70420a5933ee626dc6c46f552fa610040f006e0f5a33688c6da6c8ac1b
|
data/.gitignore
CHANGED
|
@@ -22,7 +22,8 @@ module ActiveRecord
|
|
|
22
22
|
:'db.instance' => db_instance,
|
|
23
23
|
:'db.cached' => payload.fetch(:cached, false),
|
|
24
24
|
:'db.statement' => payload.fetch(:sql).squish,
|
|
25
|
-
:'db.type' => DB_TYPE
|
|
25
|
+
:'db.type' => DB_TYPE,
|
|
26
|
+
:'peer.address' => db_address
|
|
26
27
|
}
|
|
27
28
|
)
|
|
28
29
|
|
|
@@ -43,7 +44,11 @@ module ActiveRecord
|
|
|
43
44
|
private
|
|
44
45
|
|
|
45
46
|
def db_instance
|
|
46
|
-
@db_instance ||=
|
|
47
|
+
@db_instance ||= db_config.fetch(:database)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def db_address
|
|
51
|
+
@db_address ||= begin
|
|
47
52
|
connection_config = ActiveRecord::Base.connection_config
|
|
48
53
|
username = connection_config[:username]
|
|
49
54
|
host = connection_config[:host]
|
|
@@ -58,6 +63,10 @@ module ActiveRecord
|
|
|
58
63
|
str
|
|
59
64
|
end
|
|
60
65
|
end
|
|
66
|
+
|
|
67
|
+
def db_config
|
|
68
|
+
@db_config ||= ActiveRecord::Base.connection_config
|
|
69
|
+
end
|
|
61
70
|
end
|
|
62
71
|
end
|
|
63
72
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_record-tracer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SaleMove TechMovers
|
|
@@ -148,7 +148,6 @@ files:
|
|
|
148
148
|
- ".rubocop.yml"
|
|
149
149
|
- ".travis.yml"
|
|
150
150
|
- Gemfile
|
|
151
|
-
- Gemfile.lock
|
|
152
151
|
- LICENSE.txt
|
|
153
152
|
- README.md
|
|
154
153
|
- Rakefile
|
data/Gemfile.lock
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
active_record-tracer (0.1.0)
|
|
5
|
-
activerecord (~> 5.0)
|
|
6
|
-
opentracing (~> 0.3)
|
|
7
|
-
|
|
8
|
-
GEM
|
|
9
|
-
remote: https://rubygems.org/
|
|
10
|
-
specs:
|
|
11
|
-
activemodel (5.2.0)
|
|
12
|
-
activesupport (= 5.2.0)
|
|
13
|
-
activerecord (5.2.0)
|
|
14
|
-
activemodel (= 5.2.0)
|
|
15
|
-
activesupport (= 5.2.0)
|
|
16
|
-
arel (>= 9.0)
|
|
17
|
-
activesupport (5.2.0)
|
|
18
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
19
|
-
i18n (>= 0.7, < 2)
|
|
20
|
-
minitest (~> 5.1)
|
|
21
|
-
tzinfo (~> 1.1)
|
|
22
|
-
arel (9.0.0)
|
|
23
|
-
ast (2.4.0)
|
|
24
|
-
concurrent-ruby (1.0.5)
|
|
25
|
-
diff-lcs (1.3)
|
|
26
|
-
i18n (1.0.1)
|
|
27
|
-
concurrent-ruby (~> 1.0)
|
|
28
|
-
minitest (5.11.3)
|
|
29
|
-
opentracing (0.4.1)
|
|
30
|
-
opentracing_test_tracer (0.1.0)
|
|
31
|
-
opentracing
|
|
32
|
-
parallel (1.12.1)
|
|
33
|
-
parser (2.5.1.0)
|
|
34
|
-
ast (~> 2.4.0)
|
|
35
|
-
powerpack (0.1.2)
|
|
36
|
-
rainbow (3.0.0)
|
|
37
|
-
rake (10.5.0)
|
|
38
|
-
rspec (3.7.0)
|
|
39
|
-
rspec-core (~> 3.7.0)
|
|
40
|
-
rspec-expectations (~> 3.7.0)
|
|
41
|
-
rspec-mocks (~> 3.7.0)
|
|
42
|
-
rspec-core (3.7.1)
|
|
43
|
-
rspec-support (~> 3.7.0)
|
|
44
|
-
rspec-expectations (3.7.0)
|
|
45
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
46
|
-
rspec-support (~> 3.7.0)
|
|
47
|
-
rspec-mocks (3.7.0)
|
|
48
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
49
|
-
rspec-support (~> 3.7.0)
|
|
50
|
-
rspec-support (3.7.1)
|
|
51
|
-
rubocop (0.54.0)
|
|
52
|
-
parallel (~> 1.10)
|
|
53
|
-
parser (>= 2.5)
|
|
54
|
-
powerpack (~> 0.1)
|
|
55
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
56
|
-
ruby-progressbar (~> 1.7)
|
|
57
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
|
58
|
-
rubocop-rspec (1.24.0)
|
|
59
|
-
rubocop (>= 0.53.0)
|
|
60
|
-
ruby-progressbar (1.9.0)
|
|
61
|
-
sqlite3 (1.3.13)
|
|
62
|
-
thread_safe (0.3.6)
|
|
63
|
-
tzinfo (1.2.5)
|
|
64
|
-
thread_safe (~> 0.1)
|
|
65
|
-
unicode-display_width (1.4.0)
|
|
66
|
-
|
|
67
|
-
PLATFORMS
|
|
68
|
-
ruby
|
|
69
|
-
|
|
70
|
-
DEPENDENCIES
|
|
71
|
-
active_record-tracer!
|
|
72
|
-
bundler (~> 1.16)
|
|
73
|
-
opentracing_test_tracer (~> 0.1)
|
|
74
|
-
rake (~> 10.0)
|
|
75
|
-
rspec (~> 3.0)
|
|
76
|
-
rubocop (~> 0.54.0)
|
|
77
|
-
rubocop-rspec (~> 1.24.0)
|
|
78
|
-
sqlite3 (~> 1.3.13)
|
|
79
|
-
|
|
80
|
-
BUNDLED WITH
|
|
81
|
-
1.16.2
|