signalfx-rails-instrumentation 0.1.3 → 0.1.4

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: 2d0f6b4826545fe97198f1e307b30b0b8a33d3d5
4
- data.tar.gz: 435abb5fefa867a8b6f52012d5a0443744bb345e
3
+ metadata.gz: fd00ee112bd60ec96867b56c9cd9c0d0466834eb
4
+ data.tar.gz: 275106cf764eb2661a4058cd957b85556cac92ea
5
5
  SHA512:
6
- metadata.gz: 3f004fc01ca3e0353203474917b58cd3cf542e3db7b4616c6bbc503dbffab6683c47779d998a3f9706b8ce4d737cfdf1562768b565613a95d520741e5529663f
7
- data.tar.gz: 983e80f0f8c1b03fb93c7c90b0ba7345ee3830ad6d4da2cbdb74845d8256558539166f5bbf79199d4972753913f8826fa0bdebe0a78cc2b21c4f58a8918d9811
6
+ metadata.gz: 3e0a4e8ff5890224e1b00b9d65aaf84f35e9fc87a375069579e2f5aa15cc3beaded137889b461b96209757d3389dd0b8dbf1d3dc085f50935fe85b550ff1ca49
7
+ data.tar.gz: 77f28240ea2a9209c6631c049d5bbdd7bfd86d4330966d22029657c61e5eb471e7b85a321762480afc7a20b54a62fa86f56e328e4868ff536eadcefbfd0a5f76
@@ -45,7 +45,7 @@ module ActionController
45
45
  start_time: start,
46
46
  tags: tags)
47
47
 
48
- span.finish(end_time: finish)
48
+ span.finish(end_time: finish) if span
49
49
  else
50
50
  spaninfo = {
51
51
  'event' => event,
@@ -81,7 +81,7 @@ module ActionController
81
81
  start_time: start,
82
82
  tags: tags)
83
83
 
84
- span.finish(end_time: finish)
84
+ span.finish(end_time: finish) if span
85
85
  else
86
86
  # defer the spans if full_trace is configured
87
87
  spaninfo = {
@@ -88,7 +88,7 @@ module ActionView
88
88
  start_time: start,
89
89
  tags: tags)
90
90
 
91
- span.finish(end_time: finish)
91
+ span.finish(end_time: finish) if span
92
92
  else
93
93
  spaninfo = {
94
94
  'event' => name,
@@ -26,16 +26,16 @@ module ActiveRecord
26
26
  event, start, finish, id, payload = *args
27
27
 
28
28
  connection_config = ::ActiveRecord::Base.connection_config
29
- name = payload.fetch(:name)
29
+ name = payload.fetch(:name, 'unknown')
30
30
  tags = {
31
31
  'component' => 'ActiveRecord',
32
32
  'span.kind' => 'client',
33
33
  'db.user' => connection_config.fetch(:username, 'unknown'),
34
- 'db.instance' => connection_config.fetch(:database),
35
- 'db.vendor' => connection_config.fetch(:adapter),
34
+ 'db.instance' => connection_config.fetch(:database, 'unknown'),
35
+ 'db.vendor' => connection_config.fetch(:adapter, 'unknown'),
36
36
  'db.connection_id' => payload.fetch(:connection_id, 'unknown'),
37
37
  'db.cached' => payload.fetch(:cached, false),
38
- 'db.statement' => payload.fetch(:sql),
38
+ 'db.statement' => payload.fetch(:sql, 'unknown'),
39
39
  'db.type' => 'sql'
40
40
  }
41
41
 
@@ -49,7 +49,7 @@ module ActiveRecord
49
49
  Rails::Tracer::SpanHelpers.set_error(span, payload[:exception_object] || payload[:exception])
50
50
  end
51
51
 
52
- span.finish(end_time: finish)
52
+ span.finish(end_time: finish) if span
53
53
  else
54
54
  spaninfo = {
55
55
  'event' => event,
@@ -75,11 +75,11 @@ module ActiveRecord
75
75
  'component' => 'ActiveRecord',
76
76
  'span.kind' => 'client',
77
77
  'db.user' => connection_config.fetch(:username, 'unknown'),
78
- 'db.instance' => connection_config.fetch(:database),
79
- 'db.vendor' => connection_config.fetch(:adapter),
78
+ 'db.instance' => connection_config.fetch(:database, 'unknown'),
79
+ 'db.vendor' => connection_config.fetch(:adapter, 'unknown'),
80
80
  'db.connection_id' => fields.fetch(:connection_id, 'unknown'),
81
81
  'db.cached' => fields.fetch(:cached, false),
82
- 'db.statement' => fields.fetch(:sql),
82
+ 'db.statement' => fields.fetch(:sql, 'unknown'),
83
83
  'db.type' => 'sql'
84
84
  })
85
85
  span
@@ -26,7 +26,7 @@ module ActiveSupport
26
26
  Rails::Tracer::SpanHelpers.set_error(span, payload[:exception_object] || payload[:exception])
27
27
  end
28
28
 
29
- span.finish(end_time: finish)
29
+ span.finish(end_time: finish) if span
30
30
  end
31
31
 
32
32
  def start(name, _, payload)
@@ -54,7 +54,7 @@ module ActiveSupport
54
54
  Rails::Tracer::SpanHelpers.set_error(span, payload[:exception_object] || payload[:exception])
55
55
  end
56
56
 
57
- span.finish
57
+ span.finish if span
58
58
  end
59
59
  end
60
60
  end
@@ -69,7 +69,7 @@ module Rails
69
69
  start_time: spaninfo['start'],
70
70
  tags: spaninfo['tags'])
71
71
 
72
- span.finish(end_time: spaninfo['finish'])
72
+ span.finish(end_time: spaninfo['finish']) if span
73
73
  end
74
74
  end
75
75
  end
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "signalfx-rails-instrumentation"
7
- spec.version = "0.1.3"
7
+ spec.version = "0.1.4"
8
8
  spec.authors = ["iaintshine"]
9
9
  spec.email = ["bodziomista@gmail.com"]
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signalfx-rails-instrumentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - iaintshine