opentelemetry-instrumentation-active_support 0.12.0 → 0.12.1

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: 7b0004400d17e9923e785054261455afc8a606e90e2c94a6acd192a9962208c5
4
- data.tar.gz: f9f9338abb36d19818ed07778bb9c991de6c440fb13c12c6f1bf422a291e08b2
3
+ metadata.gz: 21b7f28f097eb1e09ec11100267b5c37ea8b76d8cd059e25848ebb934280d464
4
+ data.tar.gz: 31c3e8851e7094bd5ffaecb9d21abfb82baa01b224d9ef46c410072b3dad3ca1
5
5
  SHA512:
6
- metadata.gz: cbf35c5553ec4d8458a9e5a773d8306eaeb01167ea083e8231c29e8ab90f7658664ba1a2321d2c5cbe341a3a675369e6b0df3349d258618611ea9431b265d87d
7
- data.tar.gz: 37754e32b995e39d6961151de6c97eff935a5af8c80b63dfefae8a4c758e3656a7f007978f7741c66a0625842817f79ad07f9e982f051ef7c1d07824a23c6cac
6
+ metadata.gz: 715e78cd7b732276f4ca04f19d1b772f65f1006dd73e98c2419ba29b7542fae794b1bf488130a1dd49b2b18f5edf3b187ad41cf4a500b50f6ade84281130db37
7
+ data.tar.gz: 49558e4d3ffd8f32b39896c8c3db45591cef670a4c5ab6f3dcdf300294a44194fa184472f3f556a9f70a3ae493c5ba839bd9ac1df552e11828f30e2f7ceef1c9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-active_support
2
2
 
3
+ ## v0.12.1 / 2026-07-21
4
+
5
+ - DOCS: Document active support payload options (#2437)
6
+
3
7
  ## v0.12.0 / 2026-04-28
4
8
 
5
9
  - BREAKING CHANGE: Min Rails 7.1 (enforced this time) (#2283)
data/README.md CHANGED
@@ -40,6 +40,29 @@ end
40
40
 
41
41
  ```
42
42
 
43
+ ### Subscribe options
44
+
45
+ The `subscribe` method accepts optional payload-related arguments:
46
+
47
+ - **`notification_payload_transform`:** Custom `proc` used to extract span
48
+ attributes from the notification payload. The proc receives the notification
49
+ payload and must return a `Hash`. Use this to rename keys, extract nested
50
+ values, or perform any other custom logic.
51
+ - **`disallowed_notification_payload_keys`:** Array of string notification
52
+ payload keys that should not be recorded as span attributes. Keys are matched
53
+ before the remaining payload keys are converted to strings.
54
+
55
+ ```ruby
56
+
57
+ ::OpenTelemetry::Instrumentation::ActiveSupport.subscribe(
58
+ tracer, # tracer
59
+ 'bar.foo', # pattern
60
+ ->(payload) { payload.merge('tenant' => payload['account_id']) }, # notification_payload_transform
61
+ ['account_id'] # disallowed_notification_payload_keys
62
+ )
63
+
64
+ ```
65
+
43
66
  ## Examples
44
67
 
45
68
  Example usage can be seen in the [`./example/trace_demonstration.rb` file](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/active_support/example/trace_demonstration.rb)
@@ -14,6 +14,17 @@ module OpenTelemetry
14
14
  # The SpanSubscriber is a special ActiveSupport::Notification subscription
15
15
  # handler which turns notifications into generic spans, taking care to handle
16
16
  # context appropriately.
17
+ #
18
+ # @param tracer [OpenTelemetry::Trace::Tracer] tracer used to create spans
19
+ # @param pattern [String, Regexp] ActiveSupport notification pattern
20
+ # @param notification_payload_transform [Callable, nil] optional callable
21
+ # that receives the notification payload and returns a Hash of span
22
+ # attributes
23
+ # @param disallowed_notification_payload_keys [Array<String>, nil] notification
24
+ # payload keys that should not be recorded as span attributes
25
+ # @param kind [Symbol, nil] span kind to use for generated spans
26
+ # @param span_name_formatter [Callable, nil] optional callable that receives
27
+ # the notification name and returns the span name
17
28
 
18
29
  # A very hacky way to make sure that OpenTelemetry::Instrumentation::ActiveSupport::SpanSubscriber
19
30
  # gets invoked first
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module ActiveSupport
10
- VERSION = '0.12.0'
10
+ VERSION = '0.12.1'
11
11
  end
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-active_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
@@ -44,10 +44,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
44
44
  licenses:
45
45
  - Apache-2.0
46
46
  metadata:
47
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_support/0.12.0/file/CHANGELOG.md
48
- source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/opentelemetry-instrumentation-active_support/v0.12.0/instrumentation/active_support
47
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_support/0.12.1/file/CHANGELOG.md
48
+ source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/opentelemetry-instrumentation-active_support/v0.12.1/instrumentation/active_support
49
49
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
50
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_support/0.12.0
50
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_support/0.12.1
51
51
  rdoc_options: []
52
52
  require_paths:
53
53
  - lib
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  requirements: []
65
- rubygems_version: 4.0.6
65
+ rubygems_version: 4.0.10
66
66
  specification_version: 4
67
67
  summary: ActiveSupport instrumentation for the OpenTelemetry framework
68
68
  test_files: []