opentelemetry-instrumentation-action_pack 0.2.1 → 0.3.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e808b337aa7f7d2b1f89d256b5fb47b1863713d562e31497b20feda46d9f8c8
|
4
|
+
data.tar.gz: 20dc3d8e3b3fd5adb37fdb7fac3b48f5a015c50bb57e26f2d7b22c202ced2258
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f52bf2948e572c80139a243ad0e9d1c95fcd60398a08e3a059f63b17721892faeed67a30e39a937e1edc50e521395a2bd8484cb94fd115dc5dd0e21994a6aa73
|
7
|
+
data.tar.gz: f5fd8391cb504a12a3674add3d203ff66750cc55394db7008f382ddce78118d68ff81973244bf2c25051a810b054a0620b61ab4d6f335879a93396f6a74e3ddd
|
data/CHANGELOG.md
CHANGED
@@ -14,11 +14,17 @@ module OpenTelemetry
|
|
14
14
|
def dispatch(name, request, response)
|
15
15
|
rack_span = OpenTelemetry::Instrumentation::Rack.current_span
|
16
16
|
if rack_span.recording?
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
unless request.env['action_dispatch.exception']
|
18
|
+
rack_span.name = case instrumentation_config[:span_naming]
|
19
|
+
when :controller_action then "#{self.class.name}##{name}"
|
20
|
+
else "#{request.method} #{rails_route(request)}"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
attributes_to_append = {}
|
25
|
+
attributes_to_append['http.route'] = rails_route(request) if instrumentation_config[:enable_recognize_route]
|
26
|
+
attributes_to_append['http.target'] = request.filtered_path if request.filtered_path != request.fullpath
|
27
|
+
rack_span.add_attributes(attributes_to_append) unless attributes_to_append.empty?
|
22
28
|
end
|
23
29
|
|
24
30
|
super(name, request, response)
|
@@ -26,11 +32,10 @@ module OpenTelemetry
|
|
26
32
|
|
27
33
|
private
|
28
34
|
|
29
|
-
def
|
30
|
-
::Rails.application.routes.router.recognize(request) do |route, _params|
|
31
|
-
|
35
|
+
def rails_route(request)
|
36
|
+
@rails_route ||= ::Rails.application.routes.router.recognize(request) do |route, _params|
|
37
|
+
return route.path.spec.to_s
|
32
38
|
# Rails will match on the first route - see https://guides.rubyonrails.org/routing.html#crud-verbs-and-actions
|
33
|
-
break
|
34
39
|
end
|
35
40
|
end
|
36
41
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-instrumentation-action_pack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTelemetry Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -242,10 +242,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-contrib
|
|
242
242
|
licenses:
|
243
243
|
- Apache-2.0
|
244
244
|
metadata:
|
245
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-action_pack/v0.
|
245
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-action_pack/v0.3.0/file.CHANGELOG.html
|
246
246
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/action_pack
|
247
247
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
248
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-action_pack/v0.
|
248
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby-contrib/opentelemetry-instrumentation-action_pack/v0.3.0
|
249
249
|
post_install_message:
|
250
250
|
rdoc_options: []
|
251
251
|
require_paths:
|