signalfx-tracing 1.6.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +21 -21
- data/bin/sfx-rb-trace-bootstrap +15 -15
- data/gem.deps.rb +15 -15
- data/lib/signalfx/tracing/instrumentation/rails.rb +7 -3
- data/lib/signalfx/tracing/span.rb +7 -10
- data/lib/signalfx/tracing/version.rb +1 -1
- data/signalfx-tracing.gemspec +3 -3
- metadata +33 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcb1b588a820b7e0b27f44345660f1f57d65f58a4302a0242c726c59802bf440
|
4
|
+
data.tar.gz: 75a8f68e01770b3cbf8643809deabfc562b498ba2e218b4ce5342e39f3780420
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f7300553567c11fd5a0279501a51905f0139e0d0789da6574c2505dfe070363667019a344d51197f16498001a680215ad72f836d836314f52e7bb41c8c8afb9
|
7
|
+
data.tar.gz: b74608ad7358467df7e1d41c4d457e409e083f07270a29ba24ef0e0cbae6d6f61ae03f7c84362b080518235c6ceb46e29b3f4fcc461ae02a70c00c33eb7a18ff
|
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
|
29
|
+
| [ActiveRecord](#active-record) | signalfx-activerecord-opentracing | ~> 5.0 |
|
30
30
|
| [Elasticsearch](#elasticsearch) | signalfx-elasticsearch-instrumentation | >= 6.0.2 |
|
31
31
|
| [Faraday](#faraday) | signalfx-faraday-instrumentation | >= 0.9.0 |
|
32
|
-
| [Grape](#grape) | grape-instrumentation
|
33
|
-
| [Mongo](#mongo) | mongodb-instrumentation
|
34
|
-
| [Mysql2](#mysql2) | mysql2-instrumentation
|
35
|
-
| [Net::HTTP](#nethttp) | nethttp-instrumentation
|
36
|
-
| [Pg](#pg) | pg-instrumentation
|
37
|
-
| [Rack](#rack) |
|
38
|
-
| [Rails](#rails) | rails-instrumentation
|
39
|
-
| [Redis](#redis) | redis-instrumentation
|
40
|
-
| [RestClient](#restclient) | restclient-instrumentation
|
41
|
-
| [Sequel](#sequel) | sequel-instrumentation
|
42
|
-
| [Sidekiq](#sidekiq) |
|
43
|
-
| [Sinatra](#sinatra) | sinatra-instrumentation
|
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 `
|
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/
|
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/
|
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 `
|
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 `
|
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 `
|
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
|
|
data/bin/sfx-rb-trace-bootstrap
CHANGED
@@ -4,21 +4,21 @@ require 'ostruct'
|
|
4
4
|
require 'pp'
|
5
5
|
|
6
6
|
instrumentations = {
|
7
|
-
"activerecord" => ["activerecord-opentracing", "~> 0.
|
8
|
-
"elasticsearch" => ["signalfx-elasticsearch-instrumentation", "~> 0.
|
9
|
-
"faraday" => ["signalfx-faraday-instrumentation", "~> 0.
|
10
|
-
"grape" => ["grape-instrumentation", "~> 0.
|
11
|
-
"mongodb" => ["mongodb-instrumentation", "~> 0.1.1"],
|
12
|
-
"mysql2" => ["mysql2-instrumentation", "~> 0.
|
13
|
-
"nethttp" => ["nethttp-instrumentation", "~> 0.
|
14
|
-
"pg" => ["pg-instrumentation", "~> 0.1.0"],
|
15
|
-
"rack" => ["
|
16
|
-
"rails" => ["rails-instrumentation", "~> 0.
|
17
|
-
"redis" => ["redis-instrumentation", "~> 0.
|
18
|
-
"restclient" => ["restclient-instrumentation", "~> 0.1.
|
19
|
-
"sequel" => ["sequel-instrumentation", "~> 0.1.0"],
|
20
|
-
"sidekiq" => ["
|
21
|
-
"sinatra" => ["sinatra-instrumentation", "~> 0.1.
|
7
|
+
"activerecord" => ["signalfx-activerecord-opentracing", "~> 0.1.0"],
|
8
|
+
"elasticsearch" => ["signalfx-elasticsearch-instrumentation", "~> 0.2.0"],
|
9
|
+
"faraday" => ["signalfx-faraday-instrumentation", "~> 0.2.0"],
|
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.
|
3
|
-
gem 'grape-instrumentation', "~> 0.
|
4
|
-
gem 'mongodb-instrumentation', '~> 0.1.1'
|
5
|
-
gem 'mysql2-instrumentation', '~> 0.
|
6
|
-
gem 'nethttp-instrumentation', '~> 0.
|
7
|
-
gem 'pg-instrumentation', '~> 0.1.0'
|
8
|
-
gem '
|
9
|
-
gem 'rails-instrumentation', '~> 0.
|
10
|
-
gem 'redis-instrumentation', '~> 0.
|
11
|
-
gem 'restclient-instrumentation', '~> 0.1.
|
12
|
-
gem 'sequel-instrumentation', '~> 0.1.0'
|
13
|
-
gem '
|
14
|
-
gem 'signalfx-elasticsearch-instrumentation', '~> 0.
|
15
|
-
gem 'signalfx-faraday-instrumentation', '~> 0.
|
16
|
-
gem 'sinatra-instrumentation', '~> 0.1.
|
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.0'
|
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
|
-
|
31
|
-
|
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,18 +4,15 @@ module SignalFx
|
|
4
4
|
module Tracing
|
5
5
|
module Span
|
6
6
|
def record_exception(exception, record_error=true)
|
7
|
-
set_tag(
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
:'error.
|
12
|
-
|
13
|
-
stack: exception.backtrace.join("\n")
|
14
|
-
)
|
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)
|
10
|
+
if not exception.backtrace.nil?
|
11
|
+
set_tag(:'sfx.error.stack', exception.backtrace.join('\n'))
|
12
|
+
end
|
15
13
|
end
|
16
14
|
end
|
17
15
|
end
|
18
16
|
end
|
19
17
|
|
20
|
-
|
21
|
-
Jaeger::Span.class_eval { include SignalFx::Tracing::Span }
|
18
|
+
Jaeger::Span.class_eval { prepend SignalFx::Tracing::Span }
|
data/signalfx-tracing.gemspec
CHANGED
@@ -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.
|
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
|
-
|
41
|
-
|
40
|
+
spec.add_development_dependency "faraday", "~> 1.0"
|
41
|
+
spec.add_development_dependency "signalfx-faraday-instrumentation"
|
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:
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SignalFx, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-20 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.
|
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.
|
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'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
97
125
|
description:
|
98
126
|
email:
|
99
127
|
- info@signalfx.com
|