traceview 3.0.4-java → 3.0.5-java
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ed3821a6292705e02ec4fff2d84e34da9c7c9cc
|
4
|
+
data.tar.gz: 5a033d814244dddae9e137c8bb23d76aeb56fbd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdb1e46cba04472ffa486012fef5da31cdb4c37a9bed5ecb7df10dab556b166b91818f86333cdff8b600fd962678f3d154f6749eb41fbeb5d83b0c53f69da422
|
7
|
+
data.tar.gz: 99f0b8bd3725297a5395c2fab358bba7cd3fb31c1f2fb5cc5a1f8da6312250f665082d2026cbf76508406487adc1f50da97671d169b89fc0ffd90cf6e192e514
|
@@ -38,7 +38,7 @@ module TraceView
|
|
38
38
|
def do_request_with_traceview(method, uri, query, body, header, &block)
|
39
39
|
# If we're not tracing, just do a fast return.
|
40
40
|
if !TraceView.tracing?
|
41
|
-
return
|
41
|
+
return do_request_without_traceview(method, uri, query, body, header, &block)
|
42
42
|
end
|
43
43
|
|
44
44
|
begin
|
data/lib/traceview/inst/redis.rb
CHANGED
@@ -97,11 +97,23 @@ module TraceView
|
|
97
97
|
case op
|
98
98
|
when :set
|
99
99
|
if command.count > 3
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
100
|
+
if command[3].is_a?(Hash)
|
101
|
+
options = command[3]
|
102
|
+
kvs[:ex] = options[:ex] if options.key?(:ex)
|
103
|
+
kvs[:px] = options[:px] if options.key?(:px)
|
104
|
+
kvs[:nx] = options[:nx] if options.key?(:nx)
|
105
|
+
kvs[:xx] = options[:xx] if options.key?(:xx)
|
106
|
+
else
|
107
|
+
options = command[3..-1]
|
108
|
+
until (opts = options.shift(2)).empty?
|
109
|
+
case opts[0]
|
110
|
+
when "EX"; kvs[:ex] = opts[1]
|
111
|
+
when "PX"; kvs[:px] = opts[1]
|
112
|
+
when "NX"; kvs[:nx] = opts[1]
|
113
|
+
when "XX"; kvs[:xx] = opts[1]
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
105
117
|
end
|
106
118
|
|
107
119
|
when :get
|
data/lib/traceview/version.rb
CHANGED
@@ -295,5 +295,28 @@ class HTTPClientTest < Minitest::Test
|
|
295
295
|
|
296
296
|
TraceView::Config[:httpclient][:log_args] = @log_args
|
297
297
|
end
|
298
|
+
|
299
|
+
def test_without_tracing
|
300
|
+
clear_all_traces
|
301
|
+
|
302
|
+
@tm = TraceView::Config[:tracing_mode]
|
303
|
+
TraceView::Config[:tracing_mode] = :never
|
304
|
+
|
305
|
+
response = nil
|
306
|
+
|
307
|
+
TraceView::API.start_trace('httpclient_tests') do
|
308
|
+
clnt = HTTPClient.new
|
309
|
+
response = clnt.get('http://127.0.0.1:8101/', :query => { :keyword => 'ruby', :lang => 'en' })
|
310
|
+
end
|
311
|
+
|
312
|
+
xtrace = response.headers['X-Trace']
|
313
|
+
assert xtrace == nil
|
314
|
+
|
315
|
+
traces = get_all_traces
|
316
|
+
|
317
|
+
assert_equal traces.count, 0
|
318
|
+
|
319
|
+
TraceView::Config[:tracing_mode] = @tm
|
320
|
+
end
|
298
321
|
end
|
299
322
|
|
@@ -266,6 +266,18 @@ if defined?(::Redis)
|
|
266
266
|
traces[2]['KVKey'].must_equal "one"
|
267
267
|
end
|
268
268
|
|
269
|
+
it "should trace set + expiration" do
|
270
|
+
TraceView::API.start_trace('redis_test', '', {}) do
|
271
|
+
@redis.set("one", "hello", :ex => 12)
|
272
|
+
end
|
273
|
+
|
274
|
+
traces = get_all_traces
|
275
|
+
traces.count.must_equal 4
|
276
|
+
traces[2]['KVOp'].must_equal "set"
|
277
|
+
traces[2]['KVKey'].must_equal "one"
|
278
|
+
traces[2]['ex'].must_equal 12
|
279
|
+
end
|
280
|
+
|
269
281
|
it "should trace setbit" do
|
270
282
|
min_server_version(2.2)
|
271
283
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traceview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Peter Giacomo Lombardo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-07-
|
12
|
+
date: 2015-07-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|