helios-opentelemetry-sdk 0.1.5 → 0.1.6

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: 6a8819d4ec81a4eba747e2f5a142993fb0379ff4710399cacb3f47e94dc207a6
4
- data.tar.gz: d2c7d89eedd1f9e72ed23c167dbe156e119d153cb0551530c5aa265c1b298656
3
+ metadata.gz: 2485d1903227688de3fe29555bdfb101f396f4250f9c1686edebfdacb9531f63
4
+ data.tar.gz: c6d809462561eac05f248c00adf589167f75c8934092a65b6a35fc33575abd83
5
5
  SHA512:
6
- metadata.gz: 210994aa6e58d443fd9c5cc034cb7f717578b61d8d57c7bd11ebde592a3b53d062d89de0803a95168bd1987fd3ed37eb37f3e4c88aa6f62405bed1ddddf65474
7
- data.tar.gz: e0323518f497f8ae1c585a2e50b947be10260a596acac5c19359115c7a1d0a081b5e73a6ec0a2b1a2c9052694b1a91f209ba0a4e3a54250f884ac7bbe4fdd2de
6
+ metadata.gz: a6f176ce3e1cbedf1d6aadec5dbe6f936485e7e8682191a7ebef125f4b529d08d98f01b98fe71ab2aa57b490fc7085e64d7195e58b9ae3fafb6bf63d5d2ec8a6
7
+ data.tar.gz: daaf23ffa1424ebfbb252b044631a8618813c7e36fa917474168749b6b532da4bd5278ec91da4031ee2974518e2f3320a3771a66d6fb75c850a862ae2a71e7e9
data/Gemfile CHANGED
@@ -5,5 +5,6 @@ gemspec
5
5
  gem 'opentelemetry-sdk', '~> 1.1.0'
6
6
  gem 'opentelemetry-exporter-otlp', '~> 0.22.0'
7
7
  gem 'opentelemetry-instrumentation-all', '~> 0.25.0'
8
+ gem 'opentelemetry-instrumentation-rspec', '~> 0.2.0'
8
9
  gem 'rubocop', '~> 1.30.1', group: [:development, :test]
9
10
  gem 'bundler', '~> 2.3.16', group: [:development, :test]
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- helios-opentelemetry-sdk (0.1.5)
4
+ helios-opentelemetry-sdk (0.1.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -167,6 +167,9 @@ GEM
167
167
  opentelemetry-api (~> 1.0)
168
168
  opentelemetry-common (~> 0.19.3)
169
169
  opentelemetry-instrumentation-base (~> 0.21.0)
170
+ opentelemetry-instrumentation-rspec (0.2.0)
171
+ opentelemetry-api (~> 1.0)
172
+ opentelemetry-instrumentation-base (~> 0.21.0)
170
173
  opentelemetry-instrumentation-ruby_kafka (0.19.0)
171
174
  opentelemetry-api (~> 1.0)
172
175
  opentelemetry-instrumentation-base (~> 0.21.0)
@@ -234,6 +237,7 @@ DEPENDENCIES
234
237
  helios-opentelemetry-sdk!
235
238
  opentelemetry-exporter-otlp (~> 0.22.0)
236
239
  opentelemetry-instrumentation-all (~> 0.25.0)
240
+ opentelemetry-instrumentation-rspec (~> 0.2.0)
237
241
  opentelemetry-sdk (~> 1.1.0)
238
242
  rake (~> 13.0)
239
243
  rspec (~> 3.0)
@@ -0,0 +1,51 @@
1
+ require 'opentelemetry/instrumentation/all'
2
+ require 'opentelemetry/instrumentation/rspec'
3
+
4
+ SUPPORTED_INSTRUMENTATIONS = {
5
+ 'OpenTelemetry::Instrumentation::ActiveRecord' => {},
6
+ 'OpenTelemetry::Instrumentation::ActionPack' => {},
7
+ 'OpenTelemetry::Instrumentation::Rails' => {},
8
+ 'OpenTelemetry::Instrumentation::ActionView' => {},
9
+ 'OpenTelemetry::Instrumentation::ActiveJob' => { propagation_style: :child },
10
+ 'OpenTelemetry::Instrumentation::ActiveModelSerializers' => {},
11
+ 'OpenTelemetry::Instrumentation::ActiveSupport' => {},
12
+ 'OpenTelemetry::Instrumentation::AwsSdk' => {
13
+ inject_messaging_context: true,
14
+ suppress_internal_instrumentation: true
15
+ },
16
+ 'OpenTelemetry::Instrumentation::Bunny' => {},
17
+ 'OpenTelemetry::Instrumentation::ConcurrentRuby' => {},
18
+ 'OpenTelemetry::Instrumentation::Dalli' => {},
19
+ 'OpenTelemetry::Instrumentation::DelayedJob' => {},
20
+ 'OpenTelemetry::Instrumentation::Ethon' => {},
21
+ 'OpenTelemetry::Instrumentation::Excon' => {},
22
+ 'OpenTelemetry::Instrumentation::Faraday' => {},
23
+ 'OpenTelemetry::Instrumentation::GraphQL' => {},
24
+ 'OpenTelemetry::Instrumentation::HTTP' => {},
25
+ 'OpenTelemetry::Instrumentation::HttpClient' => {},
26
+ 'OpenTelemetry::Instrumentation::Net::HTTP' => {},
27
+ 'OpenTelemetry::Instrumentation::Koala' => {},
28
+ 'OpenTelemetry::Instrumentation::LMDB' => {},
29
+ 'OpenTelemetry::Instrumentation::Mongo' => {},
30
+ 'OpenTelemetry::Instrumentation::Mysql2' => {},
31
+ 'OpenTelemetry::Instrumentation::PG' => {},
32
+ 'OpenTelemetry::Instrumentation::Que' => { propagation_style: :child },
33
+ 'OpenTelemetry::Instrumentation::Rack' => {},
34
+ 'OpenTelemetry::Instrumentation::Rdkafka' => {},
35
+ 'OpenTelemetry::Instrumentation::Redis' => {},
36
+ 'OpenTelemetry::Instrumentation::Resque' => { propagation_style: :child },
37
+ 'OpenTelemetry::Instrumentation::RestClient' => {},
38
+ 'OpenTelemetry::Instrumentation::RSpec' => nil, # Disabled for now
39
+ 'OpenTelemetry::Instrumentation::Sidekiq' => { propagation_style: :child },
40
+ 'OpenTelemetry::Instrumentation::Sinatra' => {},
41
+ 'OpenTelemetry::Instrumentation::RubyKafka' => {},
42
+ 'OpenTelemetry::Instrumentation::Trilogy' => { db_statement: :include }
43
+ }
44
+
45
+ def apply_instrumentations(otel_config)
46
+ SUPPORTED_INSTRUMENTATIONS.each do |instrumentation, config|
47
+ next if config.nil?
48
+
49
+ otel_config.use(instrumentation, config)
50
+ end
51
+ end
@@ -1,7 +1,7 @@
1
1
  module Helios
2
2
  module OpenTelemetry
3
3
  module SDK
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
  end
6
6
  end
7
7
  end
@@ -2,6 +2,7 @@ require 'opentelemetry/sdk'
2
2
  require 'opentelemetry/exporter/otlp'
3
3
  require 'opentelemetry/instrumentation/all'
4
4
  require_relative 'sdk/version'
5
+ require_relative 'sdk/instrumentations'
5
6
 
6
7
  module Helios
7
8
  module OpenTelemetry
@@ -33,7 +34,7 @@ module Helios
33
34
  resource_attrs[::OpenTelemetry::SemanticConventions::Resource::DEPLOYMENT_ENVIRONMENT] = environment
34
35
  end
35
36
  c.resource = ::OpenTelemetry::SDK::Resources::Resource.create(resource_attrs)
36
- c.use_all
37
+ apply_instrumentations(c)
37
38
  c.add_span_processor(
38
39
  ::OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
39
40
  get_span_exporter(helios_config)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helios-opentelemetry-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ran Nozik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-22 00:00:00.000000000 Z
11
+ date: 2022-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -73,6 +73,7 @@ files:
73
73
  - bin/setup
74
74
  - helios-opentelemetry-sdk.gemspec
75
75
  - lib/helios/opentelemetry/sdk.rb
76
+ - lib/helios/opentelemetry/sdk/instrumentations.rb
76
77
  - lib/helios/opentelemetry/sdk/version.rb
77
78
  homepage: https://gethelios.dev
78
79
  licenses: []