rails-instrumentation 0.1.1 → 0.1.2
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 +5 -5
- data/lib/rails/instrumentation/patch.rb +2 -2
- data/lib/rails/instrumentation/subscriber.rb +4 -0
- data/lib/rails/instrumentation/subscribers/action_cable_subscriber.rb +14 -10
- data/lib/rails/instrumentation/subscribers/action_controller_subscriber.rb +32 -27
- data/lib/rails/instrumentation/subscribers/action_mailer_subscriber.rb +10 -6
- data/lib/rails/instrumentation/subscribers/action_view_subscriber.rb +10 -6
- data/lib/rails/instrumentation/subscribers/active_job_subscriber.rb +12 -8
- data/lib/rails/instrumentation/subscribers/active_record_subscriber.rb +8 -4
- data/lib/rails/instrumentation/subscribers/active_storage_subscriber.rb +18 -14
- data/lib/rails/instrumentation/subscribers/active_support_subscriber.rb +16 -12
- data/lib/rails/instrumentation/utils.rb +1 -1
- data/lib/rails/instrumentation/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8551104747da24e8bfa6d6dbc2358c0191862fed
|
4
|
+
data.tar.gz: f41da46c02ae8c48875b643606051d441bf0047c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 448bc729d36f9612721c77c57d53da429520f62d3005d44b70c28d5f5d78a19caf33bf2551f2558395f6e773371beef4d4bca7b4d3c5616d14f1daa8613b8f40
|
7
|
+
data.tar.gz: 17b16dae5dcf85e2e0ca6bea7eba7103365eb8157544ab795f325b3f9f9d28ebcbf3992da6f2ce4767c73eedd788c9b42fe552e7a0b2b6001ec4f34f6c3a5f54
|
@@ -6,9 +6,9 @@ module Rails
|
|
6
6
|
alias_method :process_action_original, :process_action
|
7
7
|
|
8
8
|
def process_action(method_name, *args)
|
9
|
-
# this naming scheme 'method
|
9
|
+
# this naming scheme 'class.method' is how we ensure that the notification in the
|
10
10
|
# subscriber is the same one
|
11
|
-
name = "#{
|
11
|
+
name = "#{self.class.name}.#{method_name}"
|
12
12
|
scope = ::Rails::Instrumentation.tracer.start_active_span(name)
|
13
13
|
|
14
14
|
# skip adding tags here. Getting the complete set of information is
|
@@ -13,49 +13,53 @@ module Rails
|
|
13
13
|
broadcast
|
14
14
|
].freeze
|
15
15
|
|
16
|
+
# rubocop:disable Style/MutableConstant
|
17
|
+
BASE_TAGS = { 'component' => 'ActionCable' }
|
18
|
+
# rubocop:enable Style/MutableConstant.
|
19
|
+
|
16
20
|
class << self
|
17
21
|
def perform_action(event)
|
18
|
-
tags =
|
22
|
+
tags = span_tags(
|
19
23
|
'channel_class' => event.payload[:channel_class],
|
20
24
|
'action' => event.payload[:action],
|
21
25
|
'data' => event.payload[:data]
|
22
|
-
|
26
|
+
)
|
23
27
|
|
24
28
|
Utils.trace_notification(event: event, tags: tags)
|
25
29
|
end
|
26
30
|
|
27
31
|
def transmit(event)
|
28
|
-
tags =
|
32
|
+
tags = span_tags(
|
29
33
|
'channel_class' => event.payload[:channel_class],
|
30
34
|
'data' => event.payload[:data],
|
31
35
|
'via' => event.payload[:via]
|
32
|
-
|
36
|
+
)
|
33
37
|
|
34
38
|
Utils.trace_notification(event: event, tags: tags)
|
35
39
|
end
|
36
40
|
|
37
41
|
def transmit_subscription_confirmation(event)
|
38
|
-
tags =
|
42
|
+
tags = span_tags(
|
39
43
|
'channel_class' => event.payload[:channel_class]
|
40
|
-
|
44
|
+
)
|
41
45
|
|
42
46
|
Utils.trace_notification(event: event, tags: tags)
|
43
47
|
end
|
44
48
|
|
45
49
|
def transmit_subscription_rejection(event)
|
46
|
-
tags =
|
50
|
+
tags = span_tags(
|
47
51
|
'channel_class' => event.payload[:channel_class]
|
48
|
-
|
52
|
+
)
|
49
53
|
|
50
54
|
Utils.trace_notification(event: event, tags: tags)
|
51
55
|
end
|
52
56
|
|
53
57
|
def broadcast(event)
|
54
|
-
tags =
|
58
|
+
tags = span_tags(
|
55
59
|
'broadcasting' => event.payload[:broadcasting],
|
56
60
|
'message' => event.payload[:message],
|
57
61
|
'coder' => event.payload[:coder]
|
58
|
-
|
62
|
+
)
|
59
63
|
|
60
64
|
Utils.trace_notification(event: event, tags: tags)
|
61
65
|
end
|
@@ -21,72 +21,76 @@ module Rails
|
|
21
21
|
unpermitted_parameters
|
22
22
|
].freeze
|
23
23
|
|
24
|
+
# rubocop:disable Style/MutableConstant
|
25
|
+
BASE_TAGS = { 'component' => 'ActionController' }
|
26
|
+
# rubocop:enable Style/MutableConstant.
|
27
|
+
|
24
28
|
class << self
|
25
29
|
def write_fragment(event)
|
26
|
-
tags =
|
30
|
+
tags = span_tags(
|
27
31
|
'key.write' => event.payload[:key]
|
28
|
-
|
32
|
+
)
|
29
33
|
|
30
34
|
Utils.trace_notification(event: event, tags: tags)
|
31
35
|
end
|
32
36
|
|
33
37
|
def read_fragment(event)
|
34
|
-
tags =
|
38
|
+
tags = span_tags(
|
35
39
|
'key.read' => event.payload[:key]
|
36
|
-
|
40
|
+
)
|
37
41
|
|
38
42
|
Utils.trace_notification(event: event, tags: tags)
|
39
43
|
end
|
40
44
|
|
41
45
|
def expire_fragment(event)
|
42
|
-
tags =
|
46
|
+
tags = span_tags(
|
43
47
|
'key.expire' => event.payload[:key]
|
44
|
-
|
48
|
+
)
|
45
49
|
|
46
50
|
Utils.trace_notification(event: event, tags: tags)
|
47
51
|
end
|
48
52
|
|
49
53
|
def exist_fragment?(event)
|
50
|
-
tags =
|
54
|
+
tags = span_tags(
|
51
55
|
'key.exist' => event.payload[:key]
|
52
|
-
|
56
|
+
)
|
53
57
|
|
54
58
|
Utils.trace_notification(event: event, tags: tags)
|
55
59
|
end
|
56
60
|
|
57
61
|
def write_page(event)
|
58
|
-
tags =
|
62
|
+
tags = span_tags(
|
59
63
|
'path.write' => event.payload[:path]
|
60
|
-
|
64
|
+
)
|
61
65
|
|
62
66
|
Utils.trace_notification(event: event, tags: tags)
|
63
67
|
end
|
64
68
|
|
65
69
|
def expire_page(event)
|
66
|
-
tags =
|
70
|
+
tags = span_tags(
|
67
71
|
'path.expire' => event.payload[:path]
|
68
|
-
|
72
|
+
)
|
69
73
|
|
70
74
|
Utils.trace_notification(event: event, tags: tags)
|
71
75
|
end
|
72
76
|
|
73
77
|
def start_processing(event)
|
74
|
-
tags =
|
78
|
+
tags = span_tags(
|
75
79
|
'controller' => event.payload[:controller],
|
76
80
|
'controller.action' => event.payload[:action],
|
77
81
|
'request.params' => event.payload[:params],
|
78
82
|
'request.format' => event.payload[:format],
|
79
83
|
'http.method' => event.payload[:method],
|
80
84
|
'http.url' => event.payload[:path]
|
81
|
-
|
85
|
+
)
|
82
86
|
|
83
87
|
Utils.trace_notification(event: event, tags: tags)
|
84
88
|
end
|
85
89
|
|
86
90
|
def process_action(event)
|
87
|
-
span_name = "#{event.payload[:
|
91
|
+
span_name = "#{event.payload[:controller]}.#{event.payload[:action]}"
|
88
92
|
|
89
|
-
tags =
|
93
|
+
tags = span_tags(
|
90
94
|
'controller' => event.payload[:controller],
|
91
95
|
'controller.action' => event.payload[:action],
|
92
96
|
'request.params' => event.payload[:params],
|
@@ -95,8 +99,9 @@ module Rails
|
|
95
99
|
'http.url' => event.payload[:path],
|
96
100
|
'http.status_code' => event.payload[:status],
|
97
101
|
'view.runtime.ms' => event.payload[:view_runtime],
|
98
|
-
'db.runtime.ms' => event.payload[:db_runtime]
|
99
|
-
|
102
|
+
'db.runtime.ms' => event.payload[:db_runtime],
|
103
|
+
'span.kind' => 'server'
|
104
|
+
)
|
100
105
|
|
101
106
|
# Only append these tags onto the active span created by the patched 'process_action'
|
102
107
|
# Otherwise, create a new span for this notification as usual
|
@@ -111,9 +116,9 @@ module Rails
|
|
111
116
|
end
|
112
117
|
|
113
118
|
def send_file(event)
|
114
|
-
tags =
|
119
|
+
tags = span_tags(
|
115
120
|
'path.send' => event.payload[:path]
|
116
|
-
|
121
|
+
)
|
117
122
|
|
118
123
|
# there may be additional keys in the payload. It might be worth
|
119
124
|
# trying to tag them too
|
@@ -125,30 +130,30 @@ module Rails
|
|
125
130
|
# no defined keys, but user keys may be passed in. Might want to add
|
126
131
|
# them at some point
|
127
132
|
|
128
|
-
Utils.trace_notification(event: event, tags:
|
133
|
+
Utils.trace_notification(event: event, tags: BASE_TAGS)
|
129
134
|
end
|
130
135
|
|
131
136
|
def redirect_to(event)
|
132
|
-
tags =
|
137
|
+
tags = span_tags(
|
133
138
|
'http.status_code' => event.payload[:status],
|
134
139
|
'redirect.url' => event.payload[:location]
|
135
|
-
|
140
|
+
)
|
136
141
|
|
137
142
|
Utils.trace_notification(event: event, tags: tags)
|
138
143
|
end
|
139
144
|
|
140
145
|
def halted_callback(event)
|
141
|
-
tags =
|
146
|
+
tags = span_tags(
|
142
147
|
'filter' => event.payload[:filter]
|
143
|
-
|
148
|
+
)
|
144
149
|
|
145
150
|
Utils.trace_notification(event: event, tags: tags)
|
146
151
|
end
|
147
152
|
|
148
153
|
def unpermitted_parameters(event)
|
149
|
-
tags =
|
154
|
+
tags = span_tags(
|
150
155
|
'unpermitted_keys' => event.payload[:keys]
|
151
|
-
|
156
|
+
)
|
152
157
|
|
153
158
|
Utils.trace_notification(event: event, tags: tags)
|
154
159
|
end
|
@@ -11,9 +11,13 @@ module Rails
|
|
11
11
|
process
|
12
12
|
].freeze
|
13
13
|
|
14
|
+
# rubocop:disable Style/MutableConstant
|
15
|
+
BASE_TAGS = { 'component' => 'ActionMailer' }
|
16
|
+
# rubocop:enable Style/MutableConstant.
|
17
|
+
|
14
18
|
class << self
|
15
19
|
def receive(event)
|
16
|
-
tags =
|
20
|
+
tags = span_tags(
|
17
21
|
'mailer' => event.payload[:mailer],
|
18
22
|
'message.id' => event.payload[:message_id],
|
19
23
|
'message.subject' => event.payload[:subject],
|
@@ -23,13 +27,13 @@ module Rails
|
|
23
27
|
'message.cc' => event.payload[:cc],
|
24
28
|
'message.date' => event.payload[:date],
|
25
29
|
'message.body' => event.payload[:mail]
|
26
|
-
|
30
|
+
)
|
27
31
|
|
28
32
|
Utils.trace_notification(event: event, tags: tags)
|
29
33
|
end
|
30
34
|
|
31
35
|
def deliver(event)
|
32
|
-
tags =
|
36
|
+
tags = span_tags(
|
33
37
|
'mailer' => event.payload[:mailer],
|
34
38
|
'message.id' => event.payload[:message_id],
|
35
39
|
'message.subject' => event.payload[:subject],
|
@@ -39,17 +43,17 @@ module Rails
|
|
39
43
|
'message.cc' => event.payload[:cc],
|
40
44
|
'message.date' => event.payload[:date],
|
41
45
|
'message.body' => event.payload[:mail]
|
42
|
-
|
46
|
+
)
|
43
47
|
|
44
48
|
Utils.trace_notification(event: event, tags: tags)
|
45
49
|
end
|
46
50
|
|
47
51
|
def process(event)
|
48
|
-
tags =
|
52
|
+
tags = span_tags(
|
49
53
|
'mailer' => event.payload[:mailer],
|
50
54
|
'action' => event.payload[:action],
|
51
55
|
'args' => event.payload[:args]
|
52
|
-
|
56
|
+
)
|
53
57
|
|
54
58
|
Utils.trace_notification(event: event, tags: tags)
|
55
59
|
end
|
@@ -11,29 +11,33 @@ module Rails
|
|
11
11
|
render_collection
|
12
12
|
].freeze
|
13
13
|
|
14
|
+
# rubocop:disable Style/MutableConstant
|
15
|
+
BASE_TAGS = { 'component' => 'ActionView' }
|
16
|
+
# rubocop:enable Style/MutableConstant.
|
17
|
+
|
14
18
|
class << self
|
15
19
|
def render_template(event)
|
16
|
-
tags =
|
20
|
+
tags = span_tags(
|
17
21
|
'template.identifier' => event.payload[:identifier],
|
18
22
|
'template.layout' => event.payload[:layout]
|
19
|
-
|
23
|
+
)
|
20
24
|
|
21
25
|
Utils.trace_notification(event: event, tags: tags)
|
22
26
|
end
|
23
27
|
|
24
28
|
def render_partial(event)
|
25
|
-
tags =
|
29
|
+
tags = span_tags(
|
26
30
|
'partial.identifier' => event.payload[:identifier]
|
27
|
-
|
31
|
+
)
|
28
32
|
|
29
33
|
Utils.trace_notification(event: event, tags: tags)
|
30
34
|
end
|
31
35
|
|
32
36
|
def render_collection(event)
|
33
|
-
tags =
|
37
|
+
tags = span_tags(
|
34
38
|
'template.identifier' => event.payload[:identifier],
|
35
39
|
'template.count' => event.payload[:count]
|
36
|
-
|
40
|
+
)
|
37
41
|
tags['template.cache_hits'] = event.payload[:cache_hits] if event.payload.key? :cache_hits
|
38
42
|
|
39
43
|
Utils.trace_notification(event: event, tags: tags)
|
@@ -12,39 +12,43 @@ module Rails
|
|
12
12
|
perform
|
13
13
|
].freeze
|
14
14
|
|
15
|
+
# rubocop:disable Style/MutableConstant
|
16
|
+
BASE_TAGS = { 'component' => 'ActiveJob' }
|
17
|
+
# rubocop:enable Style/MutableConstant.
|
18
|
+
|
15
19
|
class << self
|
16
20
|
def enqueue_at(event)
|
17
|
-
tags =
|
21
|
+
tags = span_tags(
|
18
22
|
'adapter' => event.payload[:adapter],
|
19
23
|
'job' => event.payload[:job]
|
20
|
-
|
24
|
+
)
|
21
25
|
|
22
26
|
Utils.trace_notification(event: event, tags: tags)
|
23
27
|
end
|
24
28
|
|
25
29
|
def enqueue(event)
|
26
|
-
tags =
|
30
|
+
tags = span_tags(
|
27
31
|
'adapter' => event.payload[:adapter],
|
28
32
|
'job' => event.payload[:job]
|
29
|
-
|
33
|
+
)
|
30
34
|
|
31
35
|
Utils.trace_notification(event: event, tags: tags)
|
32
36
|
end
|
33
37
|
|
34
38
|
def perform_start(event)
|
35
|
-
tags =
|
39
|
+
tags = span_tags(
|
36
40
|
'adapter' => event.payload[:adapter],
|
37
41
|
'job' => event.payload[:job]
|
38
|
-
|
42
|
+
)
|
39
43
|
|
40
44
|
Utils.trace_notification(event: event, tags: tags)
|
41
45
|
end
|
42
46
|
|
43
47
|
def perform(event)
|
44
|
-
tags =
|
48
|
+
tags = span_tags(
|
45
49
|
'adapter' => event.payload[:adapter],
|
46
50
|
'job' => event.payload[:job]
|
47
|
-
|
51
|
+
)
|
48
52
|
|
49
53
|
Utils.trace_notification(event: event, tags: tags)
|
50
54
|
end
|
@@ -12,24 +12,28 @@ module Rails
|
|
12
12
|
instantiation
|
13
13
|
].freeze
|
14
14
|
|
15
|
+
# rubocop:disable Style/MutableConstant
|
16
|
+
BASE_TAGS = { 'component' => 'ActiveRecord' }
|
17
|
+
# rubocop:enable Style/MutableConstant.
|
18
|
+
|
15
19
|
class << self
|
16
20
|
def sql(event)
|
17
|
-
tags =
|
21
|
+
tags = span_tags(
|
18
22
|
'db.statement' => event.payload[:sql],
|
19
23
|
'name' => event.payload[:name],
|
20
24
|
'connection_id' => event.payload[:connection_id],
|
21
25
|
'binds' => event.payload[:binds],
|
22
26
|
'cached' => event.payload[:cached]
|
23
|
-
|
27
|
+
)
|
24
28
|
|
25
29
|
Utils.trace_notification(event: event, tags: tags)
|
26
30
|
end
|
27
31
|
|
28
32
|
def instantiation(event)
|
29
|
-
tags =
|
33
|
+
tags = span_tags(
|
30
34
|
'record.count' => event.payload[:record_count],
|
31
35
|
'record.class' => event.payload[:class_name]
|
32
|
-
|
36
|
+
)
|
33
37
|
|
34
38
|
Utils.trace_notification(event: event, tags: tags)
|
35
39
|
end
|
@@ -15,69 +15,73 @@ module Rails
|
|
15
15
|
service_url
|
16
16
|
].freeze
|
17
17
|
|
18
|
+
# rubocop:disable Style/MutableConstant
|
19
|
+
BASE_TAGS = { 'component' => 'ActiveStorage' }
|
20
|
+
# rubocop:enable Style/MutableConstant.
|
21
|
+
|
18
22
|
class << self
|
19
23
|
def service_upload(event)
|
20
|
-
tags =
|
24
|
+
tags = span_tags(
|
21
25
|
'key' => event.payload[:key],
|
22
26
|
'service' => event.payload[:service],
|
23
27
|
'checksum' => event.payload[:checksum]
|
24
|
-
|
28
|
+
)
|
25
29
|
|
26
30
|
Utils.trace_notification(event: event, tags: tags)
|
27
31
|
end
|
28
32
|
|
29
33
|
def service_streaming_download(event)
|
30
|
-
tags =
|
34
|
+
tags = span_tags(
|
31
35
|
'key' => event.payload[:key],
|
32
36
|
'service' => event.payload[:service]
|
33
|
-
|
37
|
+
)
|
34
38
|
|
35
39
|
Utils.trace_notification(event: event, tags: tags)
|
36
40
|
end
|
37
41
|
|
38
42
|
def service_download(event)
|
39
|
-
tags =
|
43
|
+
tags = span_tags(
|
40
44
|
'key' => event.payload[:key],
|
41
45
|
'service' => event.payload[:service]
|
42
|
-
|
46
|
+
)
|
43
47
|
|
44
48
|
Utils.trace_notification(event: event, tags: tags)
|
45
49
|
end
|
46
50
|
|
47
51
|
def service_delete(event)
|
48
|
-
tags =
|
52
|
+
tags = span_tags(
|
49
53
|
'key' => event.payload[:key],
|
50
54
|
'service' => event.payload[:service]
|
51
|
-
|
55
|
+
)
|
52
56
|
|
53
57
|
Utils.trace_notification(event: event, tags: tags)
|
54
58
|
end
|
55
59
|
|
56
60
|
def service_delete_prefixed(event)
|
57
|
-
tags =
|
61
|
+
tags = span_tags(
|
58
62
|
'key.prefix' => event.payload[:prefix],
|
59
63
|
'service' => event.payload[:service]
|
60
|
-
|
64
|
+
)
|
61
65
|
|
62
66
|
Utils.trace_notification(event: event, tags: tags)
|
63
67
|
end
|
64
68
|
|
65
69
|
def service_exist(event)
|
66
|
-
tags =
|
70
|
+
tags = span_tags(
|
67
71
|
'key' => event.payload[:key],
|
68
72
|
'service' => event.payload[:service],
|
69
73
|
'exist' => event.payload[:exist]
|
70
|
-
|
74
|
+
)
|
71
75
|
|
72
76
|
Utils.trace_notification(event: event, tags: tags)
|
73
77
|
end
|
74
78
|
|
75
79
|
def service_url(event)
|
76
|
-
tags =
|
80
|
+
tags = span_tags(
|
77
81
|
'key' => event.payload[:key],
|
78
82
|
'service' => event.payload[:service],
|
79
83
|
'url' => event.payload[:url] # generated url, not accessed url
|
80
|
-
|
84
|
+
)
|
81
85
|
|
82
86
|
Utils.trace_notification(event: event, tags: tags)
|
83
87
|
end
|
@@ -14,53 +14,57 @@ module Rails
|
|
14
14
|
cache_exist?
|
15
15
|
].freeze
|
16
16
|
|
17
|
+
# rubocop:disable Style/MutableConstant
|
18
|
+
BASE_TAGS = { 'component' => 'ActiveSupport' }
|
19
|
+
# rubocop:enable Style/MutableConstant.
|
20
|
+
|
17
21
|
class << self
|
18
22
|
def cache_read(event)
|
19
|
-
tags =
|
23
|
+
tags = span_tags(
|
20
24
|
'key' => event.payload[:key],
|
21
25
|
'hit' => event.payload[:hit],
|
22
26
|
'super_operation' => event.payload[:super_operation]
|
23
|
-
|
27
|
+
)
|
24
28
|
|
25
29
|
Utils.trace_notification(event: event, tags: tags)
|
26
30
|
end
|
27
31
|
|
28
32
|
def cache_generate(event)
|
29
|
-
tags =
|
33
|
+
tags = span_tags(
|
30
34
|
'key' => event.payload[:key]
|
31
|
-
|
35
|
+
)
|
32
36
|
|
33
37
|
Utils.trace_notification(event: event, tags: tags)
|
34
38
|
end
|
35
39
|
|
36
40
|
def cache_fetch_hit(event)
|
37
|
-
tags =
|
41
|
+
tags = span_tags(
|
38
42
|
'key' => event.payload[:key]
|
39
|
-
|
43
|
+
)
|
40
44
|
|
41
45
|
Utils.trace_notification(event: event, tags: tags)
|
42
46
|
end
|
43
47
|
|
44
48
|
def cache_write(event)
|
45
|
-
tags =
|
49
|
+
tags = span_tags(
|
46
50
|
'key' => event.payload[:key]
|
47
|
-
|
51
|
+
)
|
48
52
|
|
49
53
|
Utils.trace_notification(event: event, tags: tags)
|
50
54
|
end
|
51
55
|
|
52
56
|
def cache_delete(event)
|
53
|
-
tags =
|
57
|
+
tags = span_tags(
|
54
58
|
'key' => event.payload[:key]
|
55
|
-
|
59
|
+
)
|
56
60
|
|
57
61
|
Utils.trace_notification(event: event, tags: tags)
|
58
62
|
end
|
59
63
|
|
60
64
|
def cache_exist?(event)
|
61
|
-
tags =
|
65
|
+
tags = span_tags(
|
62
66
|
'key' => event.payload[:key]
|
63
|
-
|
67
|
+
)
|
64
68
|
|
65
69
|
Utils.trace_notification(event: event, tags: tags)
|
66
70
|
end
|
@@ -18,7 +18,7 @@ module Rails
|
|
18
18
|
# takes and event and some set of tags from a handler, and creates a
|
19
19
|
# span with the event's name and the start and finish times.
|
20
20
|
def trace_notification(event:, tags: [])
|
21
|
-
tags =
|
21
|
+
tags = ::Rails::Instrumentation::TAGS.clone.merge(tags)
|
22
22
|
|
23
23
|
span = ::Rails::Instrumentation.tracer.start_span(event.name,
|
24
24
|
tags: tags,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-instrumentation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ashwin Chandrasekar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentracing
|
@@ -184,7 +184,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
184
|
- !ruby/object:Gem::Version
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
|
-
|
187
|
+
rubyforge_project:
|
188
|
+
rubygems_version: 2.5.2
|
188
189
|
signing_key:
|
189
190
|
specification_version: 4
|
190
191
|
summary: OpenTracing instrumentation for Rails.
|