opentelemetry-instrumentation-rails 0.20.0 → 0.21.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: 3dfbca5bf36b867f29a9eb33e997aa8c5a4ee7fc1a2fb48489c3d45d19c77713
4
- data.tar.gz: 7cb3962002c4a91269ad5635f1d37652e892c978dd0f7ae468d6ef8c34a51dd0
3
+ metadata.gz: 92dfac9476a5cf08385d83f369dde0b0ecb9b8c219870618ea85f2e045da4a5b
4
+ data.tar.gz: b358b5b933e21fb1e078c823db8dcaf31e7a1abdb4c9f1e5141ae30336b83bce
5
5
  SHA512:
6
- metadata.gz: a1562b3a2f39be73c16e1da6425177a44e95a2d4ff10e123e1cc7adc199d447c1828a41d8fb5721389b8ed539a903c414a8937f746f311620cf2e1ba4182ffef
7
- data.tar.gz: 0f1fc7b1593f789550bb94a7ddd5cd59dee3623f789c7977e6f7692dfebdfe4ffbb81f2a1d74070aec9af6de38e2ab9d166e0496b7403846e56fed1836e87bc8
6
+ metadata.gz: e4a53f7278dad83bc80e05c9499ad605587b4ca78208a3d4f4b3b3f816f864d5f8633b0b6e71c4e37172e384636c7e47f072beba2bca205d79f787ab9fc7a74d
7
+ data.tar.gz: 996bd67166868d159c6033a51204be0ab5e0612bbffeae6cd7b5f48caf5e1280208e06128cbfe2e588682893e9925c2e5a3985275882f5982bc1d7023b06afed
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release History: opentelemetry-instrumentation-rails
2
2
 
3
+ ### v0.21.0 / 2022-05-02
4
+
5
+ * ADDED: OTel Railtie
6
+ * FIXED: RubyGems Fallback
7
+
3
8
  ### v0.20.0 / 2021-12-01
4
9
 
5
10
  * ADDED: Move activesupport notification subsciber out of action_view gem
@@ -24,7 +24,7 @@ module OpenTelemetry
24
24
  private
25
25
 
26
26
  def gem_version
27
- Gem.loaded_specs['actionpack'].version
27
+ ::ActionPack.version
28
28
  end
29
29
  end
30
30
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright The OpenTelemetry Authors
4
+ #
5
+ # SPDX-License-Identifier: Apache-2.0
6
+ module OpenTelemetry
7
+ module Instrumentation
8
+ module Rails
9
+ # Railtie automatically configure the OpentTelemetry SDK
10
+ #
11
+ # This railtie will set defaults for the following environment variables:
12
+ # `OTEL_SERVICE_NAME` - if unset, will default to the Rails application name
13
+ # `OTEL_RESOURCE_ATTRIBUTES` - if unset, will set the deployment environment to the current Rails environment
14
+ #
15
+ # This will also set the `OpenTelemetry.logger` to the Rails logger.
16
+ class Railtie < ::Rails::Railtie
17
+ railtie_name :opentelemetry
18
+ initializer 'opentelemetry.configure' do |app|
19
+ # See https://api.rubyonrails.org/classes/Rails/Generators/NamedBase.html#method-i-application_name
20
+ ENV['OTEL_SERVICE_NAME'] ||= app.class.name.split('::').first.underscore
21
+
22
+ ::OpenTelemetry::SDK.configure do |c|
23
+ c.logger = ::Rails.logger
24
+ c.use_all
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Rails
10
- VERSION = '0.20.0'
10
+ VERSION = '0.21.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-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.21.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-12-01 00:00:00.000000000 Z
11
+ date: 2022-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -30,42 +30,42 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.3
33
+ version: 0.1.4
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.1.3
40
+ version: 0.1.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: opentelemetry-instrumentation-action_view
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.2.0
47
+ version: 0.2.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.2.0
54
+ version: 0.2.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: opentelemetry-instrumentation-active_record
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.2.2
61
+ version: 0.3.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.2.2
68
+ version: 0.3.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: opentelemetry-instrumentation-active_support
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.19.0
89
+ version: 0.20.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.19.0
96
+ version: 0.20.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: appraisal
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '1.0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: opentelemetry-test-helpers
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: rack-test
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -277,6 +291,7 @@ files:
277
291
  - lib/opentelemetry/instrumentation.rb
278
292
  - lib/opentelemetry/instrumentation/rails.rb
279
293
  - lib/opentelemetry/instrumentation/rails/instrumentation.rb
294
+ - lib/opentelemetry/instrumentation/rails/railtie.rb
280
295
  - lib/opentelemetry/instrumentation/rails/version.rb
281
296
  homepage: https://github.com/open-telemetry/opentelemetry-ruby
282
297
  licenses: