opentelemetry-instrumentation-active_support 0.6.0 → 0.7.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: 8fb96f6aa88f3f2cfcef205f3c8b35d4aadcd5deb88f96cece9dd0483a9d651b
4
- data.tar.gz: 2e182a42afc7147b758a1bb70e8f3aed10b2a427781be74f039046081f680cd4
3
+ metadata.gz: 0bf8dd0e4f9a435db3e6ec148bf76041d50e40693ecc6bb74b99c155776452cf
4
+ data.tar.gz: f7e0a0b64847640c8f1fc037787b3be298eda876a91f166593fb6b7f148fd4e4
5
5
  SHA512:
6
- metadata.gz: c92ea1d46342f741e4773b5d4776fc1fa3cbef1dad880958e2a19a6d747b8c604ded8dff1f619a34787f4c24be206b13d6fb14dae9975c79d26fde764a90e1d1
7
- data.tar.gz: 8fa040cf4aa404157181d6907be56d695375fdd029c3f82aa7f261548a34905bf0dd1d57231cd5a5a686de29d49882583622c62004ddeebb539e7780fd558c57
6
+ metadata.gz: a49996e289ea5a04a97f30f28e13644d6e79fdf3f52b8ca95ac379d2adea111d5a2cc12e7b2220644f9f80361b8bd22da0170df3192d3c0114468b018c31df83
7
+ data.tar.gz: 1ae33a494594deefa620ec816252e41adb79d80c7200e8ba7828acc238982309bbb17497e24eb74b9f943093de3276ea33f0ebf68a7b071cfad3b4a8bd444305
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-active_support
2
2
 
3
+ ### v0.7.0 / 2024-12-19
4
+
5
+ * ADDED: Enable support for `Regexp` patterns when subscribing to Active Support's instrumentation Events
6
+
3
7
  ### v0.6.0 / 2024-07-02
4
8
 
5
9
  * BREAKING CHANGE: Custom ActiveSupport Span Names
data/README.md CHANGED
@@ -48,7 +48,7 @@ Example usage can be seen in the `./example/trace_demonstration.rb` file [here](
48
48
 
49
49
  The `opentelemetry-instrumentation-active_support` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
50
50
 
51
- The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us in [GitHub Discussions][discussions-url] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
51
+ The OpenTelemetry Ruby gems are maintained by the OpenTelemetry Ruby special interest group (SIG). You can get involved by joining us on our [GitHub Discussions][discussions-url], [Slack Channel][slack-channel] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
52
52
 
53
53
  ## License
54
54
 
@@ -60,4 +60,5 @@ The `opentelemetry-instrumentation-active_support` gem is distributed under the
60
60
  [license-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/LICENSE
61
61
  [ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
62
62
  [community-meetings]: https://github.com/open-telemetry/community#community-meetings
63
+ [slack-channel]: https://cloud-native.slack.com/archives/C01NWKKMKMY
63
64
  [discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
@@ -27,7 +27,7 @@ module OpenTelemetry
27
27
  span_name_formatter: nil
28
28
  )
29
29
  subscriber = OpenTelemetry::Instrumentation::ActiveSupport::SpanSubscriber.new(
30
- name: pattern,
30
+ pattern: pattern,
31
31
  tracer: tracer,
32
32
  notification_payload_transform: notification_payload_transform,
33
33
  disallowed_notification_payload_keys: disallowed_notification_payload_keys,
@@ -64,17 +64,18 @@ module OpenTelemetry
64
64
  ALWAYS_VALID_PAYLOAD_TYPES = [TrueClass, FalseClass, String, Numeric, Symbol].freeze
65
65
 
66
66
  # rubocop:disable Metrics/ParameterLists
67
- def initialize(name:, tracer:, notification_payload_transform: nil, disallowed_notification_payload_keys: nil, kind: nil, span_name_formatter: nil)
68
- @span_name = safe_span_name_for(span_name_formatter, name).dup.freeze
67
+ def initialize(pattern:, tracer:, notification_payload_transform: nil, disallowed_notification_payload_keys: nil, kind: nil, span_name_formatter: nil)
68
+ @pattern = pattern
69
69
  @tracer = tracer
70
70
  @notification_payload_transform = notification_payload_transform
71
71
  @disallowed_notification_payload_keys = Array(disallowed_notification_payload_keys)
72
72
  @kind = kind || :internal
73
+ @span_name_formatter = span_name_formatter
73
74
  end
74
75
  # rubocop:enable Metrics/ParameterLists
75
76
 
76
77
  def start(name, id, payload)
77
- span = @tracer.start_span(@span_name, kind: @kind)
78
+ span = @tracer.start_span(safe_span_name_for(name), kind: @kind)
78
79
  token = OpenTelemetry::Context.attach(
79
80
  OpenTelemetry::Trace.context_with_span(span)
80
81
  )
@@ -140,8 +141,8 @@ module OpenTelemetry
140
141
  # Helper method to try an shield the span name formatter from errors
141
142
  #
142
143
  # It wraps the user supplied formatter in a rescue block and returns the original name if a StandardError is raised by the formatter
143
- def safe_span_name_for(span_name_formatter, name)
144
- span_name_formatter&.call(name) || name
144
+ def safe_span_name_for(name)
145
+ @span_name_formatter&.call(name) || name
145
146
  rescue StandardError => e
146
147
  OpenTelemetry.handle_error(exception: e, message: 'Error calling span_name_formatter. Using default span name.')
147
148
  name
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module ActiveSupport
10
- VERSION = '0.6.0'
10
+ VERSION = '0.7.0'
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-active_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-02 00:00:00.000000000 Z
11
+ date: 2024-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -198,28 +198,28 @@ dependencies:
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 1.64.0
201
+ version: 1.69.1
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 1.64.0
208
+ version: 1.69.1
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: rubocop-performance
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: '1.20'
215
+ version: 1.23.0
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: '1.20'
222
+ version: 1.23.0
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: simplecov
225
225
  requirement: !ruby/object:Gem::Requirement
@@ -240,14 +240,14 @@ dependencies:
240
240
  requirements:
241
241
  - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: '3.19'
243
+ version: 3.24.0
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - "~>"
249
249
  - !ruby/object:Gem::Version
250
- version: '3.19'
250
+ version: 3.24.0
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: yard
253
253
  requirement: !ruby/object:Gem::Requirement
@@ -283,11 +283,11 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
283
283
  licenses:
284
284
  - Apache-2.0
285
285
  metadata:
286
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_support/0.6.0/file/CHANGELOG.md
286
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_support/0.7.0/file/CHANGELOG.md
287
287
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/active_support
288
288
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
289
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_support/0.6.0
290
- post_install_message:
289
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_support/0.7.0
290
+ post_install_message:
291
291
  rdoc_options: []
292
292
  require_paths:
293
293
  - lib
@@ -303,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
303
303
  version: '0'
304
304
  requirements: []
305
305
  rubygems_version: 3.2.33
306
- signing_key:
306
+ signing_key:
307
307
  specification_version: 4
308
308
  summary: ActiveSupport instrumentation for the OpenTelemetry framework
309
309
  test_files: []