signalfx-tracing 1.5.2 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -21
- data/bin/sfx-rb-trace-bootstrap +15 -15
- data/gem.deps.rb +15 -15
- data/lib/signalfx/tracing.rb +49 -28
- data/lib/signalfx/tracing/span.rb +8 -11
- data/lib/signalfx/tracing/tracer.rb +2 -2
- data/lib/signalfx/tracing/version.rb +1 -1
- data/signalfx-tracing.gemspec +5 -1
- metadata +33 -6
- data/lib/signalfx/tracing/client.rb +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bdfe4908f45da406037ff74a393f763c4b162ae1fc0fcc018bdb0c437f694ed
|
4
|
+
data.tar.gz: 654481fb002121b3f3fdb9698030c6fd88ca1dab4595de9371601cbbf877dfcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 866e9610bc170b39a318de3ab65a5c7f73e74b1cad50af8cafb33c1870bb41762c5276baf52a6adba517eb650442e984bd033456b5e9510c85a48c8da30e62ab
|
7
|
+
data.tar.gz: 8ef2fe7d563d9e3b97d3c2c8c581d5c9315f5aa3042e470acaf779f2c84cb2546f130440759f86aa542c628a4f56b6fd2b5bdf61af0a3f654d116ee554801a16
|
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
|
@@ -120,8 +120,10 @@ If the default configuration values don't apply for your environment, override t
|
|
120
120
|
| ingest_url | SIGNALFX_ENDPOINT_URL | `http://localhost:9080/v1/trace` | The endpoint the tracer sends spans to. Send spans to a Smart Agent, OpenTelemetry Collector, or a SignalFx ingest endpoint. |
|
121
121
|
| service_name | SIGNALFX_SERVICE_NAME | `signalfx-ruby-tracing` | The name to identify the service in SignalFx. |
|
122
122
|
| access_token | SIGNALFX_ACCESS_TOKEN | `''` | The SignalFx organization access token. |
|
123
|
+
| span_tags | SIGNALFX_SPAN_TAGS | `nil` | Comma-separated list of tags included in every reported span. For example, "key1:val1,key2:val2". Use only string values for tags.|
|
123
124
|
| N/A | SIGNALFX_RECORDED_VALUE_MAX_LENGTH | `1200` | Maximum length an attribute value can have. Values longer than this are truncated. |
|
124
125
|
|
126
|
+
|
125
127
|
### Automatically instrument code:
|
126
128
|
|
127
129
|
Configure the auto-instrumentor to check for modules defined in the code and
|
@@ -156,7 +158,7 @@ This instrumentation creates spans for each Active Record query using the Active
|
|
156
158
|
Support notifications framework. If you configure Rails instrumentation, it also configures Active Record instrumentation, so you don't need to instrument both.
|
157
159
|
|
158
160
|
The source for this instrumentation is located
|
159
|
-
[here](https://github.com/
|
161
|
+
[here](https://github.com/signalfx/ruby-activerecord-opentracing).
|
160
162
|
|
161
163
|
#### Usage
|
162
164
|
|
@@ -216,7 +218,7 @@ requests. If the remote service has instrumentation that is aware of Rack,
|
|
216
218
|
those spans will be automatically nested with Faraday's spans.
|
217
219
|
|
218
220
|
The source for this instrumentation is located
|
219
|
-
[here](https://github.com/
|
221
|
+
[here](https://github.com/signalfx/ruby-faraday-tracer).
|
220
222
|
|
221
223
|
#### Usage
|
222
224
|
|
@@ -369,7 +371,7 @@ end
|
|
369
371
|
```
|
370
372
|
### Rack
|
371
373
|
|
372
|
-
Rack spans are created using the `
|
374
|
+
Rack spans are created using the `signalfx-rack-tracer` gem. This is enabled
|
373
375
|
automatically for other frameworks that are built on top of Rack, but it can
|
374
376
|
also be separately enabled.
|
375
377
|
|
@@ -394,7 +396,7 @@ use Rack::Tracer
|
|
394
396
|
### Rails
|
395
397
|
|
396
398
|
Rails applications can be traced using the notifications provided by ActiveSupport.
|
397
|
-
It will use `
|
399
|
+
It will use `signalfx-rack-tracer` to trace by requests.
|
398
400
|
|
399
401
|
The forked source for this instrumentation is located
|
400
402
|
[here](https://github.com/signalfx/ruby-rails-instrumentation).
|
@@ -541,7 +543,7 @@ Arguments:
|
|
541
543
|
### Sinatra
|
542
544
|
|
543
545
|
Sinatra instrumentation traces requests and template rendering. The instrumenter
|
544
|
-
registers a Sinatra extension that uses `
|
546
|
+
registers a Sinatra extension that uses `signalfx-rack-tracer` to trace requests and
|
545
547
|
monkey-patches to trace view rendering. Rack instrumentation is automatically
|
546
548
|
enabled when using Sinatra instrumentation.
|
547
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
|
data/lib/signalfx/tracing.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
require 'jaeger/client'
|
2
|
+
require 'jaeger/samplers'
|
3
|
+
require 'jaeger/injectors'
|
4
|
+
require 'jaeger/extractors'
|
2
5
|
require 'signalfx/tracing/http_sender'
|
3
6
|
require 'signalfx/tracing/register'
|
4
7
|
require 'signalfx/tracing/compat'
|
5
|
-
require 'signalfx/tracing/client'
|
6
8
|
require 'signalfx/tracing/sfx_logger'
|
7
9
|
require 'signalfx/tracing/tags'
|
8
10
|
require 'signalfx/tracing/tracer'
|
@@ -22,11 +24,14 @@ module SignalFx
|
|
22
24
|
ingest_url: ENV['SIGNALFX_ENDPOINT_URL'] || ENV['SIGNALFX_INGEST_URL'] || 'http://localhost:9080/v1/trace',
|
23
25
|
service_name: ENV['SIGNALFX_SERVICE_NAME'] || "signalfx-ruby-tracing",
|
24
26
|
access_token: ENV['SIGNALFX_ACCESS_TOKEN'],
|
25
|
-
auto_instrument: false
|
27
|
+
auto_instrument: false,
|
28
|
+
span_tags: {})
|
26
29
|
@ingest_url = ingest_url
|
27
30
|
@service_name = service_name
|
28
31
|
@access_token = access_token
|
29
|
-
|
32
|
+
|
33
|
+
span_tags = process_span_tags(span_tags)
|
34
|
+
set_tracer(tracer: tracer, service_name: service_name, access_token: access_token, span_tags: span_tags) if @tracer.nil?
|
30
35
|
|
31
36
|
if auto_instrument
|
32
37
|
Register.available_libs.each_pair do |key, value|
|
@@ -44,6 +49,17 @@ module SignalFx
|
|
44
49
|
Compat.apply
|
45
50
|
end
|
46
51
|
|
52
|
+
def process_span_tags(span_tags={})
|
53
|
+
span_tags_string = ENV['SIGNALFX_SPAN_TAGS']
|
54
|
+
if not span_tags_string.nil?
|
55
|
+
span_tags_string.split(',').each do |t|
|
56
|
+
k, v = t.strip.split(':')
|
57
|
+
span_tags[k] = v
|
58
|
+
end
|
59
|
+
end
|
60
|
+
return span_tags
|
61
|
+
end
|
62
|
+
|
47
63
|
def instrument(to_patch, **args)
|
48
64
|
if Register.available_libs[to_patch].nil?
|
49
65
|
logger.error { "instrumentation not found: #{to_patch}" }
|
@@ -57,33 +73,38 @@ module SignalFx
|
|
57
73
|
end
|
58
74
|
end
|
59
75
|
|
60
|
-
def
|
76
|
+
def new_tracer(service_name: nil, access_token: nil, span_tags: {})
|
77
|
+
# build a new tracer if one wasn't provided
|
78
|
+
headers = {}
|
79
|
+
|
80
|
+
# don't set the header if no token was provided
|
81
|
+
headers["X-SF-Token"] = access_token if access_token && !access_token.empty?
|
82
|
+
|
83
|
+
encoder = Jaeger::Client::Encoders::ThriftEncoder.new(service_name: service_name, tags: span_tags)
|
84
|
+
@http_sender = SignalFx::Tracing::HttpSenderWithFlag.new(url: @ingest_url, headers: headers, encoder: encoder)
|
85
|
+
@reporter = Jaeger::Client::Reporters::RemoteReporter.new(sender: @http_sender, flush_interval: 1)
|
86
|
+
|
87
|
+
injectors = {
|
88
|
+
OpenTracing::FORMAT_RACK => [Jaeger::Client::Injectors::B3RackCodec],
|
89
|
+
OpenTracing::FORMAT_TEXT_MAP => [Jaeger::Client::Injectors::B3RackCodec]
|
90
|
+
}
|
91
|
+
extractors = {
|
92
|
+
OpenTracing::FORMAT_RACK => [Jaeger::Client::Extractors::B3RackCodec],
|
93
|
+
OpenTracing::FORMAT_TEXT_MAP => [Jaeger::Client::Extractors::B3TextMapCodec]
|
94
|
+
}
|
95
|
+
|
96
|
+
Tracer.new(
|
97
|
+
reporter: reporter,
|
98
|
+
sampler: Jaeger::Samplers::Const.new(true),
|
99
|
+
injectors: Jaeger::Injectors.prepare(injectors),
|
100
|
+
extractors: Jaeger::Extractors.prepare(extractors)
|
101
|
+
)
|
102
|
+
end
|
103
|
+
|
104
|
+
def set_tracer(tracer: nil, service_name: nil, access_token: nil, span_tags: {})
|
61
105
|
# build a new tracer if one wasn't provided
|
62
106
|
if tracer.nil?
|
63
|
-
|
64
|
-
|
65
|
-
# don't set the header if no token was provided
|
66
|
-
headers["X-SF-Token"] = access_token if access_token && !access_token.empty?
|
67
|
-
|
68
|
-
encoder = Jaeger::Client::Encoders::ThriftEncoder.new(service_name: service_name)
|
69
|
-
@http_sender = SignalFx::Tracing::HttpSenderWithFlag.new(url: @ingest_url, headers: headers, encoder: encoder)
|
70
|
-
@reporter = Jaeger::Client::Reporters::RemoteReporter.new(sender: @http_sender, flush_interval: 1)
|
71
|
-
|
72
|
-
injectors = {
|
73
|
-
OpenTracing::FORMAT_RACK => [Jaeger::Client::Injectors::B3RackCodec],
|
74
|
-
OpenTracing::FORMAT_TEXT_MAP => [Jaeger::Client::Injectors::B3RackCodec]
|
75
|
-
}
|
76
|
-
extractors = {
|
77
|
-
OpenTracing::FORMAT_RACK => [Jaeger::Client::Extractors::B3RackCodec],
|
78
|
-
OpenTracing::FORMAT_TEXT_MAP => [Jaeger::Client::Extractors::B3TextMapCodec]
|
79
|
-
}
|
80
|
-
|
81
|
-
@tracer = SignalFx::Tracing::Client.build(
|
82
|
-
service_name: service_name,
|
83
|
-
reporter: @reporter,
|
84
|
-
injectors: injectors,
|
85
|
-
extractors: extractors
|
86
|
-
)
|
107
|
+
@tracer = new_tracer(service_name: service_name, access_token: access_token, span_tags: span_tags)
|
87
108
|
OpenTracing.global_tracer = @tracer
|
88
109
|
else
|
89
110
|
@tracer = tracer
|
@@ -3,19 +3,16 @@ require 'jaeger/span'
|
|
3
3
|
module SignalFx
|
4
4
|
module Tracing
|
5
5
|
module Span
|
6
|
-
def
|
7
|
-
set_tag(
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
:'error.
|
12
|
-
|
13
|
-
stack: error.backtrace.join("\n")
|
14
|
-
)
|
6
|
+
def record_exception(exception, record_error=true)
|
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 }
|
@@ -13,9 +13,9 @@ module SignalFx
|
|
13
13
|
@reporter = reporter
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
16
|
+
def record_exception(exception, record_error=true)
|
17
17
|
span = active_span
|
18
|
-
span.
|
18
|
+
span.record_exception(exception, record_error) if span
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
data/signalfx-tracing.gemspec
CHANGED
@@ -34,5 +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
|
+
|
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"
|
38
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.2.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:
|
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
|
@@ -110,7 +138,6 @@ files:
|
|
110
138
|
- bin/sfx-rb-trace-bootstrap
|
111
139
|
- gem.deps.rb
|
112
140
|
- lib/signalfx/tracing.rb
|
113
|
-
- lib/signalfx/tracing/client.rb
|
114
141
|
- lib/signalfx/tracing/compat.rb
|
115
142
|
- lib/signalfx/tracing/compat/phusion_passenger.rb
|
116
143
|
- lib/signalfx/tracing/http_sender.rb
|
@@ -1,38 +0,0 @@
|
|
1
|
-
module SignalFx
|
2
|
-
module Tracing
|
3
|
-
module Client
|
4
|
-
include ::Jaeger::Client
|
5
|
-
|
6
|
-
def self.build(host: '127.0.0.1',
|
7
|
-
port: 6831,
|
8
|
-
service_name:,
|
9
|
-
flush_interval: DEFAULT_FLUSH_INTERVAL,
|
10
|
-
sampler: Samplers::Const.new(true),
|
11
|
-
logger: Logger.new(STDOUT),
|
12
|
-
sender: nil,
|
13
|
-
reporter: nil,
|
14
|
-
injectors: {},
|
15
|
-
extractors: {},
|
16
|
-
tags: {})
|
17
|
-
encoder = Encoders::ThriftEncoder.new(service_name: service_name, tags: tags)
|
18
|
-
|
19
|
-
if sender
|
20
|
-
warn '[DEPRECATION] Passing `sender` directly to Jaeger::Client.build is deprecated.' \
|
21
|
-
'Please use `reporter` instead.'
|
22
|
-
end
|
23
|
-
|
24
|
-
reporter ||= Reporters::RemoteReporter.new(
|
25
|
-
sender: sender || UdpSender.new(host: host, port: port, encoder: encoder, logger: logger),
|
26
|
-
flush_interval: flush_interval
|
27
|
-
)
|
28
|
-
|
29
|
-
Tracer.new(
|
30
|
-
reporter: reporter,
|
31
|
-
sampler: sampler,
|
32
|
-
injectors: Injectors.prepare(injectors),
|
33
|
-
extractors: Extractors.prepare(extractors)
|
34
|
-
)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|