opentelemetry-instrumentation-concurrent_ruby 0.17.0 → 0.19.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: 7dd148fd30344ebb6a6172df9f657f7caa0e76f65e3bbc370e3d9ac95ebdaaa7
4
- data.tar.gz: 8f667fc49ee70d30c603c850d4de443c46025134689e4a27c84c664ea6f9ac0e
3
+ metadata.gz: 38fc0370ca9ba419dcd660453f0e9d212ae72a57e60d426bbad999c12af9d340
4
+ data.tar.gz: 40bef73ed660e8ea412b16ed20ab87ae35f712d572994e9b20f7a68837fabdf9
5
5
  SHA512:
6
- metadata.gz: d0db6c9ab6772a7019edc4b5997df1c3e7bc249cd127090b32851b76a0c5bf1304dda6a11d3c233d96043ead6c9ab51b799ca23994000fa35395dd1d5dcf0071
7
- data.tar.gz: 04d45af56205ad77fe1b7a23d28fdb626f6f3792684b79095eb9391f1f8e6fee64808b0d6c526fa79b7ae6944337541cdacb2624e8846d08dae42d69d8a3e783
6
+ metadata.gz: 8d560698ab93692a06cfffbd0b666c8515c63353e5f89ec4fce35672e2918158ae1af49c89e8b84c4d85632fb85541c392b0b7f517a57d50a3e40479c0d0e5f7
7
+ data.tar.gz: 6e5227b916ea828642a25f152cece35492e71fd70c677dac7b51f5ca04adbcafc8b7ec698088029871388f876770a8cf4b70245f279851121a09e915422a0df5
data/CHANGELOG.md CHANGED
@@ -1,13 +1,29 @@
1
1
  # Release History: opentelemetry-instrumentation-concurrent_ruby
2
2
 
3
+ ### v0.19.0 / 2021-09-29
4
+
5
+ * ADDED: Add suport for `Concurrent::Promises::Future`
6
+
7
+ ### v0.18.2 / 2021-08-12
8
+
9
+ * DOCS: Update docs to rely more on environment variable configuration
10
+
11
+ ### v0.18.1 / 2021-06-23
12
+
13
+ * (No significant changes)
14
+
15
+ ### v0.18.0 / 2021-05-21
16
+
17
+ * ADDED: Updated API depedency for 1.0.0.rc1
18
+
3
19
  ### v0.17.0 / 2021-04-22
4
20
 
5
21
  * (No significant changes)
6
22
 
7
23
  ### v0.16.0 / 2021-03-17
8
24
 
9
- * FIXED: Example scripts now reference local common lib
10
- * DOCS: Replace Gitter with GitHub Discussions
25
+ * FIXED: Example scripts now reference local common lib
26
+ * DOCS: Replace Gitter with GitHub Discussions
11
27
 
12
28
  ### v0.15.0 / 2021-02-18
13
29
 
@@ -27,7 +43,7 @@
27
43
 
28
44
  ### v0.11.0 / 2020-12-11
29
45
 
30
- * FIXED: Copyright comments to not reference year
46
+ * FIXED: Copyright comments to not reference year
31
47
 
32
48
  ### v0.10.0 / 2020-12-03
33
49
 
@@ -35,20 +51,20 @@
35
51
 
36
52
  ### v0.9.0 / 2020-11-27
37
53
 
38
- * BREAKING CHANGE: Add timeout for force_flush and shutdown
54
+ * BREAKING CHANGE: Add timeout for force_flush and shutdown
39
55
 
40
- * ADDED: Add timeout for force_flush and shutdown
56
+ * ADDED: Add timeout for force_flush and shutdown
41
57
 
42
58
  ### v0.8.0 / 2020-10-27
43
59
 
44
- * BREAKING CHANGE: Move context/span methods to Trace module
60
+ * BREAKING CHANGE: Move context/span methods to Trace module
45
61
 
46
- * FIXED: Move context/span methods to Trace module
62
+ * FIXED: Move context/span methods to Trace module
47
63
 
48
64
  ### v0.7.0 / 2020-10-07
49
65
 
50
- * DOCS: Added README for concurrent ruby
51
- * DOCS: Standardize toplevel docs structure and readme
66
+ * DOCS: Added README for concurrent ruby
67
+ * DOCS: Standardize toplevel docs structure and readme
52
68
 
53
69
  ### v0.6.0 / 2020-09-10
54
70
 
@@ -16,17 +16,17 @@ module OpenTelemetry
16
16
  end
17
17
 
18
18
  present do
19
- defined?(::Concurrent::Future)
19
+ defined?(::Concurrent::ThreadPoolExecutor)
20
20
  end
21
21
 
22
22
  private
23
23
 
24
24
  def require_dependencies
25
- require_relative 'patches/future'
25
+ require_relative 'patches/thread_pool_executor'
26
26
  end
27
27
 
28
28
  def patch
29
- ::Concurrent::Future.send(:include, Patches::Future)
29
+ ::Concurrent::ThreadPoolExecutor.prepend Patches::ThreadPoolExecutor
30
30
  end
31
31
  end
32
32
  end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright The OpenTelemetry Authors
4
+ #
5
+ # SPDX-License-Identifier: Apache-2.0
6
+
7
+ module OpenTelemetry
8
+ module Instrumentation
9
+ module ConcurrentRuby
10
+ module Patches
11
+ # Concurrent::ThreadPoolExecutor patch for instrumentation
12
+ module ThreadPoolExecutor
13
+ # @see Concurrent::ExecutorService#post
14
+ def post(*args, **kwargs, &task)
15
+ context = OpenTelemetry::Context.current
16
+ return super unless context
17
+
18
+ super(*args, **kwargs) do
19
+ OpenTelemetry::Context.with_current(context) do
20
+ task.call(*args, **kwargs)
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module ConcurrentRuby
10
- VERSION = '0.17.0'
10
+ VERSION = '0.19.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-concurrent_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.19.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: 2021-04-23 00:00:00.000000000 Z
11
+ date: 2021-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.17.0
19
+ version: 1.0.0.rc3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.17.0
26
+ version: 1.0.0.rc3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: opentelemetry-instrumentation-base
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.17.0
33
+ version: 0.18.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.17.0
40
+ version: 0.18.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: appraisal
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.0'
103
+ version: 1.0.0.rc1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.0'
110
+ version: 1.0.0.rc1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rubocop
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -178,18 +178,17 @@ files:
178
178
  - lib/opentelemetry-instrumentation-concurrent_ruby.rb
179
179
  - lib/opentelemetry/instrumentation.rb
180
180
  - lib/opentelemetry/instrumentation/concurrent_ruby.rb
181
- - lib/opentelemetry/instrumentation/concurrent_ruby/context_composite_executor_service.rb
182
181
  - lib/opentelemetry/instrumentation/concurrent_ruby/instrumentation.rb
183
- - lib/opentelemetry/instrumentation/concurrent_ruby/patches/future.rb
182
+ - lib/opentelemetry/instrumentation/concurrent_ruby/patches/thread_pool_executor.rb
184
183
  - lib/opentelemetry/instrumentation/concurrent_ruby/version.rb
185
184
  homepage: https://github.com/open-telemetry/opentelemetry-ruby
186
185
  licenses:
187
186
  - Apache-2.0
188
187
  metadata:
189
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-concurrent_ruby/v0.17.0/file.CHANGELOG.html
188
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-concurrent_ruby/v0.19.0/file.CHANGELOG.html
190
189
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/concurrent_ruby
191
190
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
192
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-concurrent_ruby/v0.17.0
191
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-concurrent_ruby/v0.19.0
193
192
  post_install_message:
194
193
  rdoc_options: []
195
194
  require_paths:
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright The OpenTelemetry Authors
4
- #
5
- # SPDX-License-Identifier: Apache-2.0
6
-
7
- require 'concurrent/executor/executor_service'
8
- require 'forwardable'
9
-
10
- module OpenTelemetry
11
- module Instrumentation
12
- module ConcurrentRuby
13
- # Wraps existing executor to carry over trace context
14
- class ContextCompositeExecutorService
15
- extend Forwardable
16
- include Concurrent::ExecutorService
17
-
18
- attr_accessor :composited_executor
19
-
20
- def initialize(composited_executor)
21
- @composited_executor = composited_executor
22
- end
23
-
24
- # post method runs the task within composited executor
25
- # in a different thread
26
- def post(*args, &task)
27
- context = OpenTelemetry::Context.current
28
-
29
- @composited_executor.post(*args) do
30
- OpenTelemetry::Context.with_current(context) do
31
- yield
32
- end
33
- end
34
- end
35
-
36
- delegate %i[can_overflow? serialized?] => :composited_executor
37
- end
38
- end
39
- end
40
- end
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright The OpenTelemetry Authors
4
- #
5
- # SPDX-License-Identifier: Apache-2.0
6
-
7
- require_relative '../context_composite_executor_service'
8
-
9
- module OpenTelemetry
10
- module Instrumentation
11
- module ConcurrentRuby
12
- module Patches
13
- # Concurrent::Future patch for instrumentation
14
- module Future
15
- def self.included(base)
16
- base.class_eval do
17
- alias_method :ns_initialize_without_otel, :ns_initialize
18
- remove_method(:ns_initialize)
19
-
20
- def ns_initialize(value, opts)
21
- ns_initialize_without_otel(value, opts)
22
-
23
- @executor = ContextCompositeExecutorService.new(@executor)
24
- end
25
- end
26
- end
27
- end
28
- end
29
- end
30
- end
31
- end