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 +4 -4
- data/lib/rails/action_controller/tracer.rb +2 -2
- data/lib/rails/action_view/tracer.rb +1 -1
- data/lib/rails/active_record/tracer.rb +8 -8
- data/lib/rails/active_support/cache/subscriber.rb +2 -2
- data/lib/rails/defer_notifications.rb +1 -1
- data/rails-tracer.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd00ee112bd60ec96867b56c9cd9c0d0466834eb
|
4
|
+
data.tar.gz: 275106cf764eb2661a4058cd957b85556cac92ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 = {
|
@@ -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
|
data/rails-tracer.gemspec
CHANGED