opentelemetry-instrumentation-action_pack 0.12.2 → 0.12.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4262115e2b8bb06f5aa8dee186cc073fa3998796d2ee0a5107493c752d575eb9
|
4
|
+
data.tar.gz: 40c809efb6f9a26ce5f2e5c35e9fbca63a0b8ab24ccb9b84217d138f46a42df7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '019f275b7a386e8c963a74bba5a97f7eb3ef40fe59986a89c82d2b8564548f886a5cce2ddc9e92870e1081a8835c06a8bdcc1af2de6b0be917a31742e9333c72'
|
7
|
+
data.tar.gz: 61cdabe47d151ae6ef41d64aa3cb34efd5d9ac8b93a8fa4aed59f41497ca94319f86ddd60a15e6d616476185d686f93da2ba1d181517992fec4f809ddb27c995
|
data/CHANGELOG.md
CHANGED
@@ -23,6 +23,9 @@ module OpenTelemetry
|
|
23
23
|
# @param payload [Hash] the payload passed as a method argument
|
24
24
|
# @return [Hash] the payload passed as a method argument
|
25
25
|
def start(_name, _id, payload)
|
26
|
+
span = OpenTelemetry::Instrumentation::Rack.current_span
|
27
|
+
return unless span.recording?
|
28
|
+
|
26
29
|
request = payload[:request]
|
27
30
|
# It seems that there are cases in Rails functional tests where it bypasses the routing system and the `action_dispatch.route_uri_pattern` header not being set.
|
28
31
|
# Our Test suite executes the routing system so we are unable to recreate this error case.
|
@@ -36,22 +39,18 @@ module OpenTelemetry
|
|
36
39
|
attributes[OpenTelemetry::SemanticConventions::Trace::HTTP_ROUTE] = http_route if http_route
|
37
40
|
attributes[OpenTelemetry::SemanticConventions::Trace::HTTP_TARGET] = request.filtered_path if request.filtered_path != request.fullpath
|
38
41
|
|
39
|
-
|
40
|
-
|
41
|
-
if http_route
|
42
|
+
if @span_naming == :semconv
|
43
|
+
span.name = if http_route
|
42
44
|
"#{request.method} #{http_route}"
|
43
45
|
else
|
44
46
|
"#{request.method} /#{payload.dig(:params, :controller)}/#{payload.dig(:params, :action)}"
|
45
47
|
end
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
"#{payload[:controller]}##{payload[:action]}"
|
52
|
-
end
|
48
|
+
# If there is an exception we want to keep the original span name
|
49
|
+
# so it is easier to see where the request was routed to.
|
50
|
+
elsif !request.env['action_dispatch.exception']
|
51
|
+
span.name = "#{payload[:controller]}##{payload[:action]}"
|
52
|
+
end
|
53
53
|
|
54
|
-
span.name = span_name
|
55
54
|
span.add_attributes(attributes)
|
56
55
|
rescue StandardError => e
|
57
56
|
OpenTelemetry.handle_error(exception: e)
|
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.12.
|
4
|
+
version: 0.12.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTelemetry Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-06-
|
11
|
+
date: 2025-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -75,10 +75,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
|
75
75
|
licenses:
|
76
76
|
- Apache-2.0
|
77
77
|
metadata:
|
78
|
-
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-action_pack/0.12.
|
78
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-action_pack/0.12.3/file/CHANGELOG.md
|
79
79
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/action_pack
|
80
80
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
81
|
-
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-action_pack/0.12.
|
81
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-action_pack/0.12.3
|
82
82
|
post_install_message:
|
83
83
|
rdoc_options: []
|
84
84
|
require_paths:
|