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: d469bead142d9682483795b636de7c9d46fc8d410651f3409ab8e106a9d28f48
4
- data.tar.gz: 3e5fbfaa2a26ea52fa01f58077f8420e92b4a7a3561a4b6547ecbeecfcea07c7
3
+ metadata.gz: 4262115e2b8bb06f5aa8dee186cc073fa3998796d2ee0a5107493c752d575eb9
4
+ data.tar.gz: 40c809efb6f9a26ce5f2e5c35e9fbca63a0b8ab24ccb9b84217d138f46a42df7
5
5
  SHA512:
6
- metadata.gz: 98b81892126505b05311b3ca67feb6e530e7543742fa36895e301312e737ed8e5804f8c840aaf8e743ac29e00cec79d81be9908313888311f958225ba7a38d65
7
- data.tar.gz: 1207dcac466eb75ba81f1b2ce75e8be3136f26d22e997fdb4acace9b84fbadba18aac959f181f29c8a2a0b091a9e9c7b5a3c2e37d86ec108080391c888bd8266
6
+ metadata.gz: '019f275b7a386e8c963a74bba5a97f7eb3ef40fe59986a89c82d2b8564548f886a5cce2ddc9e92870e1081a8835c06a8bdcc1af2de6b0be917a31742e9333c72'
7
+ data.tar.gz: 61cdabe47d151ae6ef41d64aa3cb34efd5d9ac8b93a8fa4aed59f41497ca94319f86ddd60a15e6d616476185d686f93da2ba1d181517992fec4f809ddb27c995
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-action_pack
2
2
 
3
+ ### v0.12.3 / 2025-06-16
4
+
5
+ * FIXED: Action_pack always assuming sdk spans
6
+
3
7
  ### v0.12.2 / 2025-06-04
4
8
 
5
9
  * FIXED: Rack span class naming
@@ -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
- span = OpenTelemetry::Instrumentation::Rack.current_span
40
- span_name = if @span_naming == :semconv
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
- # If there is an exception we want to keep the original span name
47
- # so it is easier to see where the request was routed to.
48
- elsif request.env['action_dispatch.exception']
49
- span.name
50
- else
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)
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module ActionPack
10
- VERSION = '0.12.2'
10
+ VERSION = '0.12.3'
11
11
  end
12
12
  end
13
13
  end
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.2
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-04 00:00:00.000000000 Z
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.2/file/CHANGELOG.md
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.2
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: