active_record-tracer 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 3de6b0a32b1ee458de56fe23f721e2b535d068b5
4
- data.tar.gz: a4d6a8cbaa4e6b91aa3145c32649a2f5c19388ee
3
+ metadata.gz: 6d5d825e88bd7cc190019ef64623f883a79b8c0c
4
+ data.tar.gz: dbbdda4dc2ac808bfa6f3cc95bff15793c134f15
5
5
  SHA512:
6
- metadata.gz: 6f8fc82999537bb3cd0e0db8240c3f633d67b8d7f908a631c8edbad606ed76ede83eb02f8e5043a5313bf19e15a3965048de0edb552f7928099d0ae669c2a53a
7
- data.tar.gz: d9a50c9e6202ac1f758a06791655e179a14aceb716052b891dd9bf18f625dfca102612a69c233dd99a97445991908b292d85b91f1a39207bbd8e5de335a9ebb5
6
+ metadata.gz: 33624dde8e8fe48fd1f1b1b2cff8cc156196f962530f77dfb79e13de5d3f4a7531623f42243096a9f282f1c0b1f3af1eec3dc6806ad261a57c3d82bd48a1c713
7
+ data.tar.gz: 58133a52ff53673974a2c47eade04fe599e313ca1cc5c801524f8b9d70bd5dfdb77b5a70420a5933ee626dc6c46f552fa610040f006e0f5a33688c6da6c8ac1b
data/.gitignore CHANGED
@@ -7,6 +7,7 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
  /tracer-test
10
+ /Gemfile.lock
10
11
 
11
12
  # rspec failure tracking
12
13
  .rspec_status
@@ -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 ||= begin
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveRecord
4
4
  module Tracer
5
- VERSION = '0.1.0'.freeze
5
+ VERSION = '0.1.1'.freeze
6
6
  end
7
7
  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.0
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
@@ -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