scout_apm 3.0.0.pre25 → 3.0.0.pre26

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: 0d2364c7ae5bfc518cc19c5059e90959a15203bc
4
- data.tar.gz: 45a2372a9d6a96460b946419ec02c3ceb63a4d2d
3
+ metadata.gz: d464aa5c996bd02a57ce41e4fe6891ea7cac1c27
4
+ data.tar.gz: ac8778e12b752200d391e0dd8a5e9e56e19ac5e7
5
5
  SHA512:
6
- metadata.gz: 607f2bf5f3b6eedab959e49c277972f00c72c03d408782a8cc0466a7fc44a2e5dce11a4279da227f64cb5baeda9d1ad4ed8ead972687906abd19750973e7246b
7
- data.tar.gz: 0bb02a39eb5dd459665b9049038e275e08fe3ddd60a1ffcb5b2d6af1f7f31f8291d58eaac2a8cac577527a8a046167f2492058af6e20d7f725691b25e0b1d40f
6
+ metadata.gz: a3554af6cc62a696af7fcfc31b027bd54294f80159b19cc5727fd2946c00cc53d04e1cdaf82c72bf956e011bb21f7ccc3da31a7a510aa021ef7fda74ec9d0667
7
+ data.tar.gz: 421dbf05b82468f80a40e4b7fa95d45e890bc1a68e401476603c54728b3f50f9282d304bf57044a60c0750d1fc51b0ae0ccc4d2fc60f6ccdfcebe77068b95711
data/CHANGELOG.markdown CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  * ScoutProf BETA
4
4
 
5
+ # 2.4.15
6
+
7
+ * Fix bug that causes no data to be reported to Scout when DataDog is installed (#211)
8
+ * Fix `NoMethodError for LayerChildrenSet` when `log_level: debug` in certain situations.
9
+
10
+ # 2.4.14
11
+
12
+ * Fix database connection issue when installed in an app also using the Textacular gem
13
+
5
14
  # 2.4.13
6
15
 
7
16
  * Incorporating total time consumed into transaction trace policy
data/README.markdown CHANGED
@@ -38,6 +38,23 @@ Your config file should look like:
38
38
  production:
39
39
  <<: *defaults
40
40
 
41
+ ## DevTrace Quickstart
42
+
43
+ To use DevTrace, our free, no-signup, in-browser development profiler:
44
+
45
+ 1. Add the gem to your Gemfile:
46
+
47
+ ```ruby
48
+ # Gemfile
49
+ gem 'scout_apm'
50
+ ```
51
+
52
+ 2. Start your Rails app with the SCOUT_DEV_TRACE environment variable:
53
+
54
+ ```
55
+ SCOUT_DEV_TRACE=true rails server
56
+ ```
57
+
41
58
  ## Docs
42
59
 
43
60
  For the complete list of supported frameworks, Rubies, configuration options
@@ -55,12 +55,21 @@ module ScoutApm
55
55
  end
56
56
  end
57
57
 
58
+ # Note, this code intentionally avoids `.respond_to?` because of an
59
+ # infinite loop created by the Textacular gem (tested against 3.2.2 of
60
+ # that gem), which some customers have installed.
61
+ #
62
+ # The loop was:
63
+ # - Ask for database adapter
64
+ # - Do .respond_to? on AR::Base to look for connection_config (which isn't present on some versions of rails)
65
+ # - Textacular gem has a monkey-patch that queries the columns of the db
66
+ # This obtains a connection, and runs a query.
67
+ # - Scout tries to run SQLSanitizer against the query, which needs the database adapter.
68
+ # - Goes back to first step.
69
+ #
70
+ # We avoid this issue by not calling .respond_to? here, and instead using the less optimal `rescue nil` approach
58
71
  def raw_database_adapter
59
- adapter = if ActiveRecord::Base.respond_to?(:connection_config)
60
- ActiveRecord::Base.connection_config[:adapter].to_s
61
- else
62
- nil
63
- end
72
+ adapter = ActiveRecord::Base.connection_config[:adapter].to_s rescue nil
64
73
 
65
74
  if adapter.nil?
66
75
  adapter = ActiveRecord::Base.configurations[env]["adapter"]
@@ -142,7 +142,10 @@ module ScoutApm
142
142
  req = ScoutApm::RequestManager.lookup
143
143
  layer = req.current_layer
144
144
  if layer && layer.type == "ActiveRecord"
145
- layer.annotate_layer(payload)
145
+ layer.annotate_layer({
146
+ :class_name => payload[:class_name],
147
+ :record_count => payload[:record_count]
148
+ })
146
149
  elsif layer
147
150
  logger.debug("Expected layer type: ActiveRecord, got #{layer && layer.type}")
148
151
  else
@@ -69,6 +69,14 @@ module ScoutApm
69
69
  end
70
70
  end
71
71
 
72
+ def length
73
+ @children.length
74
+ end
75
+
76
+ def size
77
+ @children.size
78
+ end
79
+
72
80
  # hold off initializing this until we know we need it
73
81
  def init_limited_layers
74
82
  @limited_layers ||= Hash.new { |hash, key| hash[key] = LimitedLayer.new(key) }
@@ -1,3 +1,3 @@
1
1
  module ScoutApm
2
- VERSION = "3.0.0.pre25"
2
+ VERSION = "3.0.0.pre26"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.pre25
4
+ version: 3.0.0.pre26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-26 00:00:00.000000000 Z
12
+ date: 2018-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -397,52 +397,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
397
397
  version: 1.3.1
398
398
  requirements: []
399
399
  rubyforge_project: scout_apm
400
- rubygems_version: 2.4.6
400
+ rubygems_version: 2.4.5.5
401
401
  signing_key:
402
402
  specification_version: 4
403
403
  summary: Ruby application performance monitoring
404
- test_files:
405
- - test/data/config_test_1.yml
406
- - test/test_helper.rb
407
- - test/unit/agent_test.rb
408
- - test/unit/background_job_integrations/sidekiq_test.rb
409
- - test/unit/config_test.rb
410
- - test/unit/context_test.rb
411
- - test/unit/db_query_metric_set_test.rb
412
- - test/unit/db_query_metric_stats_test.rb
413
- - test/unit/environment_test.rb
414
- - test/unit/extensions/periodic_callbacks_test.rb
415
- - test/unit/extensions/transaction_callbacks_test.rb
416
- - test/unit/fake_store_test.rb
417
- - test/unit/git_revision_test.rb
418
- - test/unit/histogram_test.rb
419
- - test/unit/ignored_uris_test.rb
420
- - test/unit/instruments/active_record_instruments_test.rb
421
- - test/unit/instruments/net_http_test.rb
422
- - test/unit/instruments/percentile_sampler_test.rb
423
- - test/unit/layaway_test.rb
424
- - test/unit/layer_children_set_test.rb
425
- - test/unit/layer_converters/depth_first_walker_test.rb
426
- - test/unit/layer_converters/metric_converter_test.rb
427
- - test/unit/layer_converters/stubs.rb
428
- - test/unit/limited_layer_test.rb
429
- - test/unit/logger_test.rb
430
- - test/unit/metric_set_test.rb
431
- - test/unit/remote/test_message.rb
432
- - test/unit/remote/test_router.rb
433
- - test/unit/remote/test_server.rb
434
- - test/unit/scored_item_set_test.rb
435
- - test/unit/serializers/payload_serializer_test.rb
436
- - test/unit/slow_job_policy_test.rb
437
- - test/unit/slow_request_policy_test.rb
438
- - test/unit/sql_sanitizer_test.rb
439
- - test/unit/store_test.rb
440
- - test/unit/tracer_test.rb
441
- - test/unit/tracked_request_test.rb
442
- - test/unit/transaction_test.rb
443
- - test/unit/transaction_time_consumed_test.rb
444
- - test/unit/utils/active_record_metric_name_test.rb
445
- - test/unit/utils/backtrace_parser_test.rb
446
- - test/unit/utils/numbers_test.rb
447
- - test/unit/utils/scm.rb
448
- has_rdoc:
404
+ test_files: []