signalfx-tracing 1.6.1 → 2.3.1

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: eb69751bf1eff41423dfb43a0470b00194ee39ca02cd1647eecbe845e31e0472
4
- data.tar.gz: c3d1bb44a2fda8b7aa96b68ed98be8e1d6a23a502f570e7e04eb5ef42f413b1c
3
+ metadata.gz: e1a81b9b2fa728642164bf2bc2ee4b48d80b3a4b23a74b11e962d1e7506ab02b
4
+ data.tar.gz: 5a57de5df779ffdaf83f7fd8b3948b5d75b9fd3339fc00c10a6eef005ec62762
5
5
  SHA512:
6
- metadata.gz: 977d6e639a0bd2098d23147cee9de114fca97e8156f67e186775a457c380a11ac52169765c3a5d796f170b89e8f4c04971366f6382428ddc4a015ccd8de1df33
7
- data.tar.gz: c475b7183dcd21489595eb46d0168550b0b0f4b40bf0a9e8fe1f2f6321b9a4e5feee53913c93ba73d746f1ad3c6b89fd3cc4c1aa0f921542554ebf951f533cd0
6
+ metadata.gz: 7c1398cc79cce7c1bdf3f54b7906b79df8d20cf8a135656751f081dae48af1d532e5a0469dfbec275a0f2f87ae63de3e5f5701e48a67f2bb5b3df23297a1767e
7
+ data.tar.gz: 87c64425e3a95ecb8e2529d0974aa9281fb70b2dc7d15c74134b71ca156f5673610a05e91ea37680a2ed37912ad1433439b6da41fa8679bf3abeb5f1ce20b6a0
data/README.md CHANGED
@@ -26,25 +26,25 @@ Here are the requirements and supported software for the library.
26
26
 
27
27
  | Library | Instrumentation name | Versions Supported |
28
28
  | ------------------------------- | -------------------------------------- | ------------------ |
29
- | [ActiveRecord](#active-record) | activerecord-opentracing | ~> 5.0 |
29
+ | [ActiveRecord](#active-record) | signalfx-activerecord-opentracing | ~> 5.0 |
30
30
  | [Elasticsearch](#elasticsearch) | signalfx-elasticsearch-instrumentation | >= 6.0.2 |
31
- | [Faraday](#faraday) | signalfx-faraday-instrumentation | >= 0.9.0 |
32
- | [Grape](#grape) | grape-instrumentation | >= 0.2.0 |
33
- | [Mongo](#mongo) | mongodb-instrumentation | >= 2.1.0 |
34
- | [Mysql2](#mysql2) | mysql2-instrumentation | >= 0.4.0 |
35
- | [Net::HTTP](#nethttp) | nethttp-instrumentation | Ruby >= 2.0 |
36
- | [Pg](#pg) | pg-instrumentation | >= 0.18.0 |
37
- | [Rack](#rack) | sfx-rack-tracer | >= 0.10.0 |
38
- | [Rails](#rails) | rails-instrumentation | >= 3.0.0 |
39
- | [Redis](#redis) | redis-instrumentation | >= 4.0.0 |
40
- | [RestClient](#restclient) | restclient-instrumentation | >= 1.5.0 |
41
- | [Sequel](#sequel) | sequel-instrumentation | >= 3.47.0 |
42
- | [Sidekiq](#sidekiq) | sfx-sidekiq-opentracing | >= 0.7.0 |
43
- | [Sinatra](#sinatra) | sinatra-instrumentation | >= 1.0.0 |
31
+ | [Faraday](#faraday) | signalfx-faraday-instrumentation | >= 0.2.1 |
32
+ | [Grape](#grape) | signalfx-grape-instrumentation | >= 0.2.0 |
33
+ | [Mongo](#mongo) | signalfgx-mongodb-instrumentation | >= 2.1.0 |
34
+ | [Mysql2](#mysql2) | signalfx-mysql2-instrumentation | >= 0.4.0 |
35
+ | [Net::HTTP](#nethttp) | signalfx-nethttp-instrumentation | Ruby >= 2.0 |
36
+ | [Pg](#pg) | signalfx-pg-instrumentation | >= 0.18.0 |
37
+ | [Rack](#rack) | signalfx-rack-tracer | >= 0.10.0 |
38
+ | [Rails](#rails) | signalfx-rails-instrumentation | >= 3.0.0 |
39
+ | [Redis](#redis) | signalfx-redis-instrumentation | >= 4.0.0 |
40
+ | [RestClient](#restclient) | signalfx-restclient-instrumentation | >= 1.5.0 |
41
+ | [Sequel](#sequel) | signalfx-sequel-instrumentation | >= 3.47.0 |
42
+ | [Sidekiq](#sidekiq) | signalfx-sidekiq-opentracing | >= 0.7.0 |
43
+ | [Sinatra](#sinatra) | signalfx-sinatra-instrumentation | >= 1.0.0 |
44
44
 
45
45
  Instrumentation for routes using Puma or Passenger is provided through
46
46
  Rack. If you use a framework that builds on top of Rack, such as Rails or
47
- Sinatra, install the `sfx-rack-tracer` instrumentation with your dependency manager
47
+ Sinatra, install the `signalfx-rack-tracer` instrumentation with your dependency manager
48
48
  or with the bootstrap utility. In these cases, the routes through the web
49
49
  server are automatically traced.
50
50
 
@@ -89,8 +89,8 @@ The steps assume you have RubyGems and Bundler.
89
89
  3. Add each applicable instrumentation to your application's Gemfile. For
90
90
  example, this is how you add Rails and Redis:
91
91
  ```bash
92
- $ gem 'rails-instrumentation'
93
- $ gem 'redis-instrumentation'
92
+ $ gem 'signalfx-rails-instrumentation'
93
+ $ gem 'signalfx-redis-instrumentation'
94
94
  ```
95
95
  For information about instrumentation names, see supported libraries and their
96
96
  current versions in `gem.deps.rb`. If you configure Rails instrumentation, it
@@ -158,7 +158,7 @@ This instrumentation creates spans for each Active Record query using the Active
158
158
  Support notifications framework. If you configure Rails instrumentation, it also configures Active Record instrumentation, so you don't need to instrument both.
159
159
 
160
160
  The source for this instrumentation is located
161
- [here](https://github.com/salemove/ruby-activerecord-opentracing).
161
+ [here](https://github.com/signalfx/ruby-activerecord-opentracing).
162
162
 
163
163
  #### Usage
164
164
 
@@ -218,7 +218,7 @@ requests. If the remote service has instrumentation that is aware of Rack,
218
218
  those spans will be automatically nested with Faraday's spans.
219
219
 
220
220
  The source for this instrumentation is located
221
- [here](https://github.com/opentracing-contrib/ruby-faraday-tracer).
221
+ [here](https://github.com/signalfx/ruby-faraday-tracer).
222
222
 
223
223
  #### Usage
224
224
 
@@ -371,7 +371,7 @@ end
371
371
  ```
372
372
  ### Rack
373
373
 
374
- Rack spans are created using the `sfx-rack-tracer` gem. This is enabled
374
+ Rack spans are created using the `signalfx-rack-tracer` gem. This is enabled
375
375
  automatically for other frameworks that are built on top of Rack, but it can
376
376
  also be separately enabled.
377
377
 
@@ -396,7 +396,7 @@ use Rack::Tracer
396
396
  ### Rails
397
397
 
398
398
  Rails applications can be traced using the notifications provided by ActiveSupport.
399
- It will use `sfx-rack-tracer` to trace by requests.
399
+ It will use `signalfx-rack-tracer` to trace by requests.
400
400
 
401
401
  The forked source for this instrumentation is located
402
402
  [here](https://github.com/signalfx/ruby-rails-instrumentation).
@@ -543,7 +543,7 @@ Arguments:
543
543
  ### Sinatra
544
544
 
545
545
  Sinatra instrumentation traces requests and template rendering. The instrumenter
546
- registers a Sinatra extension that uses `sfx-rack-tracer` to trace requests and
546
+ registers a Sinatra extension that uses `signalfx-rack-tracer` to trace requests and
547
547
  monkey-patches to trace view rendering. Rack instrumentation is automatically
548
548
  enabled when using Sinatra instrumentation.
549
549
 
@@ -4,21 +4,21 @@ require 'ostruct'
4
4
  require 'pp'
5
5
 
6
6
  instrumentations = {
7
- "activerecord" => ["activerecord-opentracing", "~> 0.2.1"],
8
- "elasticsearch" => ["signalfx-elasticsearch-instrumentation", "~> 0.1.0"],
9
- "faraday" => ["signalfx-faraday-instrumentation", "~> 0.1.1"],
10
- "grape" => ["grape-instrumentation", "~> 0.2.0"],
11
- "mongodb" => ["mongodb-instrumentation", "~> 0.1.1"],
12
- "mysql2" => ["mysql2-instrumentation", "~> 0.2.1"],
13
- "nethttp" => ["nethttp-instrumentation", "~> 0.1.2"],
14
- "pg" => ["pg-instrumentation", "~> 0.1.0"],
15
- "rack" => ["sfx-rack-tracer", "~> 0.10.0"],
16
- "rails" => ["rails-instrumentation", "~> 0.1.5"],
17
- "redis" => ["redis-instrumentation", "~> 0.2.0"],
18
- "restclient" => ["restclient-instrumentation", "~> 0.1.1"],
19
- "sequel" => ["sequel-instrumentation", "~> 0.1.0"],
20
- "sidekiq" => ["sfx-sidekiq-opentracing", "~> 0.0.3"],
21
- "sinatra" => ["sinatra-instrumentation", "~> 0.1.2"]
7
+ "activerecord" => ["signalfx-activerecord-opentracing", "~> 0.1.0"],
8
+ "elasticsearch" => ["signalfx-elasticsearch-instrumentation", "~> 0.2.0"],
9
+ "faraday" => ["signalfx-faraday-instrumentation", "~> 0.2.1"],
10
+ "grape" => ["signalfx-grape-instrumentation", "~> 0.1.0"],
11
+ "mongodb" => ["signalfx-mongodb-instrumentation", "~> 0.1.1"],
12
+ "mysql2" => ["signalfx-mysql2-instrumentation", "~> 0.1.1"],
13
+ "nethttp" => ["signalfx-nethttp-instrumentation", "~> 0.2.0"],
14
+ "pg" => ["signalfx-pg-instrumentation", "~> 0.1.0"],
15
+ "rack" => ["signalfx-rack-tracer", "~> 0.1.0"],
16
+ "rails" => ["signalfx-rails-instrumentation", "~> 0.2.0"],
17
+ "redis" => ["signalfx-redis-instrumentation", "~> 0.1.0"],
18
+ "restclient" => ["signalfx-restclient-instrumentation", "~> 0.1.0"],
19
+ "sequel" => ["signalfx-sequel-instrumentation", "~> 0.1.0"],
20
+ "sidekiq" => ["signalfx-sidekiq-opentracing", "~> 0.1.0"],
21
+ "sinatra" => ["signalfx-sinatra-instrumentation", "~> 0.1.0"]
22
22
  }
23
23
 
24
24
  options = OpenStruct.new
data/gem.deps.rb CHANGED
@@ -1,17 +1,17 @@
1
1
  group :instrumentations do
2
- gem 'activerecord-opentracing', '~> 0.2.1'
3
- gem 'grape-instrumentation', "~> 0.2.0"
4
- gem 'mongodb-instrumentation', '~> 0.1.1'
5
- gem 'mysql2-instrumentation', '~> 0.2.1'
6
- gem 'nethttp-instrumentation', '~> 0.1.2'
7
- gem 'pg-instrumentation', '~> 0.1.0'
8
- gem 'sfx-rack-tracer', '~> 0.10.0'
9
- gem 'rails-instrumentation', '~> 0.1.5'
10
- gem 'redis-instrumentation', '~> 0.2.0'
11
- gem 'restclient-instrumentation', '~> 0.1.1'
12
- gem 'sequel-instrumentation', '~> 0.1.0'
13
- gem 'sfx-sidekiq-opentracing', '~> 0.0.3'
14
- gem 'signalfx-elasticsearch-instrumentation', '~> 0.1.0'
15
- gem 'signalfx-faraday-instrumentation', '~> 0.1.1'
16
- gem 'sinatra-instrumentation', '~> 0.1.2'
2
+ gem 'signalfx-activerecord-opentracing', '~> 0.1.0'
3
+ gem 'signalfx-grape-instrumentation', "~> 0.1.0"
4
+ gem 'signalfx-mongodb-instrumentation', '~> 0.1.1'
5
+ gem 'signalfx-mysql2-instrumentation', '~> 0.1.1'
6
+ gem 'signalfx-nethttp-instrumentation', '~> 0.2.0'
7
+ gem 'signalfx-pg-instrumentation', '~> 0.1.0'
8
+ gem 'signalfx-rack-tracer', '~> 0.1.0'
9
+ gem 'signalfx-rails-instrumentation', '~> 0.2.0'
10
+ gem 'signalfx-redis-instrumentation', '~> 0.1.0'
11
+ gem 'signalfx-restclient-instrumentation', '~> 0.1.0'
12
+ gem 'signalfx-sequel-instrumentation', '~> 0.1.0'
13
+ gem 'signalfx-sidekiq-opentracing', '~> 0.1.0'
14
+ gem 'signalfx-elasticsearch-instrumentation', '~> 0.2.0'
15
+ gem 'signalfx-faraday-instrumentation', '~> 0.2.1'
16
+ gem 'signalfx-sinatra-instrumentation', '~> 0.1.0'
17
17
  end
@@ -20,15 +20,19 @@ module SignalFx
20
20
 
21
21
  begin
22
22
  require 'rails/instrumentation'
23
- require 'rack/tracer'
24
23
  rescue LoadError => e
25
24
  puts e.message
26
25
  return
27
26
  end
28
27
 
29
28
  if opts.fetch(:rack_tracer, true)
30
- # add rack middlewares
31
- ::Rails.configuration.middleware.insert(0, ::Rack::Tracer)
29
+ begin
30
+ # add rack middlewares
31
+ require 'rack/tracer'
32
+ ::Rails.configuration.middleware.insert(0, ::Rack::Tracer)
33
+ rescue LoadError => e
34
+ puts e.message
35
+ end
32
36
  end
33
37
 
34
38
  exclude_events = opts.fetch(:exclude_events, [])
@@ -4,24 +4,15 @@ module SignalFx
4
4
  module Tracing
5
5
  module Span
6
6
  def record_exception(exception, record_error=true)
7
- set_tag('error', true) if record_error
8
-
9
- fields = {
10
- :event => 'error',
11
- :'error.kind' => exception.class.to_s,
12
- :'error.object' => exception,
13
- :message => exception.message,
14
- }
15
-
7
+ set_tag(:error, true) if record_error
8
+ set_tag(:'sfx.error.kind', exception.class.to_s)
9
+ set_tag(:'sfx.error.message', exception.message)
16
10
  if not exception.backtrace.nil?
17
- fields[:stack] = exception.backtrace.join('\n')
11
+ set_tag(:'sfx.error.stack', exception.backtrace.join('\n'))
18
12
  end
19
-
20
- log_kv(**fields)
21
13
  end
22
14
  end
23
15
  end
24
16
  end
25
17
 
26
-
27
- Jaeger::Span.class_eval { include SignalFx::Tracing::Span }
18
+ Jaeger::Span.class_eval { prepend SignalFx::Tracing::Span }
@@ -1,5 +1,5 @@
1
1
  module Signalfx
2
2
  module Tracing
3
- VERSION = "1.6.1"
3
+ VERSION = "2.3.1"
4
4
  end
5
5
  end
@@ -34,9 +34,9 @@ Gem::Specification.new do |spec|
34
34
  # `gem install -g`
35
35
 
36
36
  # stdlib instrumentations
37
- spec.add_dependency "nethttp-instrumentation", "~> 0.1.2"
37
+ spec.add_dependency "signalfx-nethttp-instrumentation", "~> 0.2.0"
38
38
 
39
39
  # uncomment and run `bundle install` in order to run the whole test suite
40
- # spec.add_development_dependency "faraday", "~> 1.0"
41
- # spec.add_development_dependency "signalfx-faraday-instrumentation"
40
+ spec.add_development_dependency "faraday", "~> 1.0"
41
+ spec.add_development_dependency "signalfx-faraday-instrumentation", "~> 0.2.1"
42
42
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signalfx-tracing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SignalFx, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-17 00:00:00.000000000 Z
11
+ date: 2021-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -81,19 +81,47 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.0.0
83
83
  - !ruby/object:Gem::Dependency
84
- name: nethttp-instrumentation
84
+ name: signalfx-nethttp-instrumentation
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.1.2
89
+ version: 0.2.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.1.2
96
+ version: 0.2.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: faraday
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: signalfx-faraday-instrumentation
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.2.1
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.2.1
97
125
  description:
98
126
  email:
99
127
  - info@signalfx.com