traceview 3.8.1 → 3.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +43 -0
  3. data/.travis.yml +5 -4
  4. data/CHANGELOG.md +114 -114
  5. data/Gemfile +5 -6
  6. data/README.md +3 -3
  7. data/Rakefile +18 -21
  8. data/examples/DNT.md +3 -3
  9. data/examples/carrying_context.rb +26 -31
  10. data/examples/instrumenting_metal_controller.rb +1 -1
  11. data/examples/puma_on_heroku_config.rb +3 -3
  12. data/examples/tracing_async_threads.rb +9 -9
  13. data/examples/tracing_background_jobs.rb +5 -7
  14. data/examples/tracing_forked_processes.rb +13 -14
  15. data/examples/unicorn_on_heroku_config.rb +4 -4
  16. data/gemfiles/rails50.gemfile +1 -1
  17. data/lib/joboe_metal.rb +2 -5
  18. data/lib/oboe/backward_compatibility.rb +3 -5
  19. data/lib/oboe_metal.rb +37 -43
  20. data/lib/traceview/api/logging.rb +1 -2
  21. data/lib/traceview/base.rb +3 -0
  22. data/lib/traceview/config.rb +19 -3
  23. data/lib/traceview/frameworks/rails/inst/action_controller.rb +2 -2
  24. data/lib/traceview/frameworks/rails/inst/{action_controller5_api.rb → action_controller_api.rb} +0 -0
  25. data/lib/traceview/frameworks/rails/inst/connection_adapters/utils.rb +2 -2
  26. data/lib/traceview/frameworks/rails/inst/connection_adapters/utils5x.rb +3 -4
  27. data/lib/traceview/inst/httpclient.rb +12 -12
  28. data/lib/traceview/inst/mongo2.rb +7 -8
  29. data/lib/traceview/inst/moped.rb +334 -343
  30. data/lib/traceview/inst/rack.rb +14 -2
  31. data/lib/traceview/inst/redis.rb +104 -110
  32. data/lib/traceview/inst/sequel.rb +43 -37
  33. data/lib/traceview/inst/twitter-cassandra.rb +12 -6
  34. data/lib/traceview/support.rb +34 -32
  35. data/lib/traceview/util.rb +7 -4
  36. data/lib/traceview/version.rb +1 -1
  37. data/test/instrumentation/curb_test.rb +2 -24
  38. data/test/instrumentation/httpclient_test.rb +7 -18
  39. data/test/instrumentation/{cassandra_test.rb → twitter-cassandra_test.rb} +32 -0
  40. data/test/minitest_helper.rb +0 -3
  41. data/test/settings +0 -0
  42. data/test/support/avw_handling_test.rb +13 -23
  43. data/test/support/config_test.rb +1 -1
  44. data/test/support/tracing_mode_test.rb +44 -0
  45. metadata +10 -6
@@ -96,7 +96,7 @@ describe "TraceView::Config" do
96
96
 
97
97
  TraceView::Config[:blacklist].is_a?(Array).must_equal true
98
98
 
99
- TraceView::Config[:dnt_regexp].must_equal "\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|ttf|woff|svg|less)$"
99
+ TraceView::Config[:dnt_regexp].must_equal '\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|ttf|woff|svg|less)$'
100
100
  TraceView::Config[:dnt_opts].must_equal Regexp::IGNORECASE
101
101
  end
102
102
 
@@ -0,0 +1,44 @@
1
+ # Copyright (c) 2015 AppNeta, Inc.
2
+ # All rights reserved.
3
+
4
+ require 'minitest_helper'
5
+
6
+ class TracingModeTest < Minitest::Test
7
+ def setup
8
+ TraceView::Config[:tracing_mode] = :always
9
+ end
10
+
11
+ def test_dont_start_trace_when_through
12
+ skip
13
+
14
+ TraceView::Config[:tracing_mode] = :through
15
+
16
+ TV::API.start_trace(:test_through) do
17
+ TraceView.tracing?.must_equal false
18
+ end
19
+ end
20
+
21
+ def test_trace_when_always
22
+ skip
23
+
24
+ TraceView::Config[:tracing_mode] = :always
25
+
26
+ TV::API.start_trace(:test_always) do
27
+ TraceView.tracing?.must_equal true
28
+ end
29
+ end
30
+
31
+ def test_dont_trace_when_never
32
+ skip
33
+
34
+ TraceView::Config[:tracing_mode] = :never
35
+
36
+ TV::API.start_trace(:test_never) do
37
+ TraceView.tracing?.must_equal false
38
+ end
39
+
40
+ TV::API.start_trace('asdf') do
41
+ TraceView.tracing?.must_equal false
42
+ end
43
+ end
44
+ end
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.8.1
4
+ version: 3.8.2
5
5
  platform: ruby
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: 2016-05-05 00:00:00.000000000 Z
12
+ date: 2016-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -90,6 +90,7 @@ extensions:
90
90
  extra_rdoc_files:
91
91
  - LICENSE
92
92
  files:
93
+ - ".codeclimate.yml"
93
94
  - ".gitignore"
94
95
  - ".rubocop.yml"
95
96
  - ".travis.yml"
@@ -158,7 +159,7 @@ files:
158
159
  - lib/traceview/frameworks/rails/inst/action_controller3.rb
159
160
  - lib/traceview/frameworks/rails/inst/action_controller4.rb
160
161
  - lib/traceview/frameworks/rails/inst/action_controller5.rb
161
- - lib/traceview/frameworks/rails/inst/action_controller5_api.rb
162
+ - lib/traceview/frameworks/rails/inst/action_controller_api.rb
162
163
  - lib/traceview/frameworks/rails/inst/action_view.rb
163
164
  - lib/traceview/frameworks/rails/inst/action_view_2x.rb
164
165
  - lib/traceview/frameworks/rails/inst/action_view_30.rb
@@ -219,7 +220,6 @@ files:
219
220
  - test/frameworks/sinatra_test.rb
220
221
  - test/instrumentation/bunny_client_test.rb
221
222
  - test/instrumentation/bunny_consumer_test.rb
222
- - test/instrumentation/cassandra_test.rb
223
223
  - test/instrumentation/curb_test.rb
224
224
  - test/instrumentation/dalli_test.rb
225
225
  - test/instrumentation/em_http_request_test.rb
@@ -249,6 +249,7 @@ files:
249
249
  - test/instrumentation/sequel_pg_test.rb
250
250
  - test/instrumentation/sidekiq-client_test.rb
251
251
  - test/instrumentation/sidekiq-worker_test.rb
252
+ - test/instrumentation/twitter-cassandra_test.rb
252
253
  - test/instrumentation/typhoeus_test.rb
253
254
  - test/jobs/delayed_job/db_worker_job.rb
254
255
  - test/jobs/delayed_job/error_worker_job.rb
@@ -275,6 +276,7 @@ files:
275
276
  - test/servers/sidekiq.rb
276
277
  - test/servers/sidekiq.yml
277
278
  - test/servers/sidekiq_initializer.rb
279
+ - test/settings
278
280
  - test/support/auto_tracing_test.rb
279
281
  - test/support/avw_handling_test.rb
280
282
  - test/support/backcompat_test.rb
@@ -284,6 +286,7 @@ files:
284
286
  - test/support/liboboe_settings_test.rb
285
287
  - test/support/noop_test.rb
286
288
  - test/support/sql_sanitize_test.rb
289
+ - test/support/tracing_mode_test.rb
287
290
  - test/support/tvalias_test.rb
288
291
  - test/support/xtrace_test.rb
289
292
  - traceview.gemspec
@@ -307,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
307
310
  version: '0'
308
311
  requirements: []
309
312
  rubyforge_project:
310
- rubygems_version: 2.6.1
313
+ rubygems_version: 2.5.1
311
314
  signing_key:
312
315
  specification_version: 4
313
316
  summary: AppNeta TraceView performance instrumentation gem for Ruby
@@ -332,9 +335,9 @@ test_files:
332
335
  - test/instrumentation/rack_test.rb
333
336
  - test/instrumentation/sidekiq-client_test.rb
334
337
  - test/instrumentation/mongo_v2_index_test.rb
335
- - test/instrumentation/cassandra_test.rb
336
338
  - test/instrumentation/redis_strings_test.rb
337
339
  - test/instrumentation/typhoeus_test.rb
340
+ - test/instrumentation/twitter-cassandra_test.rb
338
341
  - test/instrumentation/sequel_mysql2_test.rb
339
342
  - test/instrumentation/bunny_consumer_test.rb
340
343
  - test/instrumentation/mongo_v2_view_test.rb
@@ -381,6 +384,7 @@ test_files:
381
384
  - test/support/backcompat_test.rb
382
385
  - test/support/xtrace_test.rb
383
386
  - test/support/auto_tracing_test.rb
387
+ - test/support/tracing_mode_test.rb
384
388
  - test/minitest_helper.rb
385
389
  - test/jobs/sidekiq/remote_call_worker_job.rb
386
390
  - test/jobs/sidekiq/error_worker_job.rb