signalfx-tracing 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: 666e9a206d3c59e0f15c75d8a11164afb51205a9
4
- data.tar.gz: 74a5e9d4778ff1366150a6f23faf67c014f941e8
3
+ metadata.gz: 2895e8bf78ad2950cee421ab39432066bc3e5759
4
+ data.tar.gz: 50f9c249e44c29508418bfc53f1009c6b891f803
5
5
  SHA512:
6
- metadata.gz: 6136200e41b59f4c3b1dd8656722ad1735056dc684888a38c332e2dac8ccf2c15d5b70efb39c555d315de2b6f134ceb9d8fc76e47f5218faa1d9c6dec78d18ce
7
- data.tar.gz: 5fb9162345c81dc5f81c2355c131fb5e0c76204ffa4127f5401fa401ac51b22ca3acc8f7ed194725bf2cf01fdffe23c26563c2e0b078655ec42d3f071a124eda
6
+ metadata.gz: 436695c4e5df210926b807504fcd9c43a2a87ac52383891f1a53bb8be14bbc1bb8d4856d9525bb0255a44c88ad72686c0aa0efb8c218a433db32565a957a078b
7
+ data.tar.gz: 60f991b99e0d59beb7589158c401b1c2629efe57a5fda3c7b649044b860fc300c94376d9bbbe12c42440b40e016bebf42adb6fad2fd76ba488e6822cc00367bb
data/README.md CHANGED
@@ -103,6 +103,7 @@ When interfacing with these web servers as a Rack application, please configure
103
103
  | Net::HTTP | Ruby > 2.0 |
104
104
  | Rack | >= 2.0 |
105
105
  | Rails | >= 4.2.0 |
106
+ | Redis | >= 4.0.1 |
106
107
  | REST Client | >= 2.0.0 |
107
108
  | Sinatra | >= 1.1.4 |
108
109
 
@@ -269,6 +270,24 @@ Note that if `rack_tracer` is set to `false`, requests propagated to the Rails
269
270
  app will not be extracted. For example, if a traced service makes a request to
270
271
  an endpoint served by the Rails app, it will not be automatically nested.
271
272
 
273
+ ## Redis
274
+
275
+ This instrumentation traces commands performed using the [Redis client](https://github.com/redis/redis-rb).
276
+
277
+ The source for this instrumentation is located [here](https://github.com/signalfx/ruby-redis-instrumentation).
278
+
279
+ ### Usage
280
+
281
+ ```ruby
282
+ SignalFx::Tracing::Instrumenter.configure do |p|
283
+ p.instrument(:Redis, tracer: tracer)
284
+ end
285
+ ```
286
+
287
+ Arguments:
288
+ - `tracer`: Optional custom tracer to use for this instrumentation
289
+ - Default: `OpenTracing.global_tracer`
290
+
272
291
  ## RestClient
273
292
 
274
293
  RestClient requests can be patched to automatically be wrapped in a span. It
@@ -0,0 +1,25 @@
1
+ module SignalFx
2
+ module Tracing
3
+ module Instrumenter
4
+ module Redis
5
+
6
+ Register.add_lib :Redis, self
7
+
8
+ class << self
9
+ def instrument(opts = {})
10
+ begin
11
+ require 'redis'
12
+ rescue LoadError => e
13
+ return
14
+ end
15
+
16
+ require 'redis/instrumentation'
17
+
18
+ tracer = opts.fetch(:tracer, OpenTracing.global_tracer)
19
+ ::Redis::Instrumentation.instrument(tracer: tracer)
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -39,3 +39,4 @@ require 'signalfx/tracing/instrumentation/restclient'
39
39
  require 'signalfx/tracing/instrumentation/mongodb'
40
40
  require 'signalfx/tracing/instrumentation/elasticsearch'
41
41
  require 'signalfx/tracing/instrumentation/mysql2'
42
+ require 'signalfx/tracing/instrumentation/redis'
@@ -1,5 +1,5 @@
1
1
  module Signalfx
2
2
  module Tracing
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
@@ -44,6 +44,7 @@ Gem::Specification.new do |spec|
44
44
  spec.add_dependency "restclient-instrumentation", "~> 0.1"
45
45
  spec.add_dependency "mongodb-instrumentation", "~> 0.1"
46
46
  spec.add_dependency "mysql2-instrumentation", "~> 0.1"
47
+ spec.add_dependency "redis-instrumentation", "~> 0.1"
47
48
 
48
49
  # forks
49
50
  spec.add_dependency "signalfx-rails-instrumentation", "~> 0.1"
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: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashwin Chandrasekar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-19 00:00:00.000000000 Z
11
+ date: 2018-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0.1'
139
+ - !ruby/object:Gem::Dependency
140
+ name: redis-instrumentation
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.1'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.1'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: signalfx-rails-instrumentation
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -232,6 +246,7 @@ files:
232
246
  - lib/signalfx/tracing/instrumentation/patching-test.rb
233
247
  - lib/signalfx/tracing/instrumentation/rack.rb
234
248
  - lib/signalfx/tracing/instrumentation/rails.rb
249
+ - lib/signalfx/tracing/instrumentation/redis.rb
235
250
  - lib/signalfx/tracing/instrumentation/restclient.rb
236
251
  - lib/signalfx/tracing/instrumentation/sinatra.rb
237
252
  - lib/signalfx/tracing/register.rb