scout_apm 0.9.2.2 → 0.9.3pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/scout_apm.rb +1 -0
- data/lib/scout_apm/agent/reporting.rb +5 -1
- data/lib/scout_apm/environment.rb +14 -9
- data/lib/scout_apm/framework_integrations/rails_2.rb +1 -0
- data/lib/scout_apm/framework_integrations/rails_3_or_4.rb +2 -1
- data/lib/scout_apm/serializers/payload_serializer.rb +2 -2
- data/lib/scout_apm/utils/unique_id.rb +15 -0
- data/lib/scout_apm/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f2a25966bed125bef4e5af063ba90cc73512786
|
4
|
+
data.tar.gz: 23abb02567200410a1cc02be33306f1e3746142d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 464b22471dcf5e9fa9d76d9396d590a3c9ab7343c8b99962a43c209da4e3735dfcaabda0356c5d0386c2beb752109a186479d6e01745de31f9992318df6d9230
|
7
|
+
data.tar.gz: 0d86312dfa978d54a527684f42726bcd803bd9c54ac7ab92014e361288d258b3cb82adc28605b1591dc4a783f9b7d478bd383091c4b0d8e9bf22d5c4fb1a0d66
|
data/lib/scout_apm.rb
CHANGED
@@ -59,6 +59,7 @@ require 'scout_apm/utils/sql_sanitizer'
|
|
59
59
|
require 'scout_apm/utils/null_logger'
|
60
60
|
require 'scout_apm/utils/installed_gems'
|
61
61
|
require 'scout_apm/utils/time'
|
62
|
+
require 'scout_apm/utils/unique_id'
|
62
63
|
|
63
64
|
require 'scout_apm/config'
|
64
65
|
require 'scout_apm/environment'
|
@@ -33,8 +33,12 @@ module ScoutApm
|
|
33
33
|
|
34
34
|
logger.debug("Metrics: #{metrics}")
|
35
35
|
logger.debug("SlowTrans: #{slow_transactions}")
|
36
|
+
metadata = {
|
37
|
+
app_root: ScoutApm::Environment.instance.root,
|
38
|
+
unique_id: ScoutApm::Utils::UniqueId.simple
|
39
|
+
}
|
36
40
|
|
37
|
-
payload = ScoutApm::Serializers::PayloadSerializer.serialize(metrics, slow_transactions)
|
41
|
+
payload = ScoutApm::Serializers::PayloadSerializer.serialize(metadata, metrics, slow_transactions)
|
38
42
|
slow_transactions_kb = Marshal.dump(slow_transactions).size/1024 # just for performance debugging
|
39
43
|
|
40
44
|
logger.info "Delivering #{metrics.length} Metrics for #{total_request_count} requests and #{slow_transactions.length} Slow Transaction Traces"
|
@@ -7,14 +7,19 @@ module ScoutApm
|
|
7
7
|
|
8
8
|
# I've put Thin and Webrick last as they are often used in development and included in Gemfiles
|
9
9
|
# but less likely used in production.
|
10
|
+
STDOUT_LOGGER = begin
|
11
|
+
l = Logger.new(STDOUT)
|
12
|
+
l.level = Agent.instance.config.value("log_level", true) || Logger::INFO
|
13
|
+
end
|
14
|
+
|
10
15
|
SERVER_INTEGRATIONS = [
|
11
|
-
ScoutApm::ServerIntegrations::Passenger.new(
|
12
|
-
ScoutApm::ServerIntegrations::Unicorn.new(
|
13
|
-
ScoutApm::ServerIntegrations::Rainbows.new(
|
14
|
-
ScoutApm::ServerIntegrations::Puma.new(
|
15
|
-
ScoutApm::ServerIntegrations::Thin.new(
|
16
|
-
ScoutApm::ServerIntegrations::Webrick.new(
|
17
|
-
ScoutApm::ServerIntegrations::Null.new(
|
16
|
+
ScoutApm::ServerIntegrations::Passenger.new(STDOUT_LOGGER),
|
17
|
+
ScoutApm::ServerIntegrations::Unicorn.new(STDOUT_LOGGER),
|
18
|
+
ScoutApm::ServerIntegrations::Rainbows.new(STDOUT_LOGGER),
|
19
|
+
ScoutApm::ServerIntegrations::Puma.new(STDOUT_LOGGER),
|
20
|
+
ScoutApm::ServerIntegrations::Thin.new(STDOUT_LOGGER),
|
21
|
+
ScoutApm::ServerIntegrations::Webrick.new(STDOUT_LOGGER),
|
22
|
+
ScoutApm::ServerIntegrations::Null.new(STDOUT_LOGGER), # must be last
|
18
23
|
]
|
19
24
|
|
20
25
|
FRAMEWORK_INTEGRATIONS = [
|
@@ -25,8 +30,8 @@ module ScoutApm
|
|
25
30
|
]
|
26
31
|
|
27
32
|
DEPLOY_INTEGRATIONS = [
|
28
|
-
ScoutApm::DeployIntegrations::Capistrano3.new(
|
29
|
-
# ScoutApm::DeployIntegrations::Capistrano2.new(
|
33
|
+
ScoutApm::DeployIntegrations::Capistrano3.new(STDOUT_LOGGER),
|
34
|
+
# ScoutApm::DeployIntegrations::Capistrano2.new(STDOUT_LOGGER),
|
30
35
|
]
|
31
36
|
|
32
37
|
def env
|
@@ -38,9 +38,10 @@ module ScoutApm
|
|
38
38
|
if defined?(ActiveRecord::Base)
|
39
39
|
config = ActiveRecord::Base.connection_config
|
40
40
|
if config && config[:adapter]
|
41
|
-
case config[:adapter]
|
41
|
+
case config[:adapter].to_s
|
42
42
|
when "postgres" then :postgres
|
43
43
|
when "postgresql" then :postgres
|
44
|
+
when "postgis" then :postgres
|
44
45
|
when "sqlite3" then :sqlite
|
45
46
|
when "mysql" then :mysql
|
46
47
|
else default
|
@@ -2,8 +2,8 @@
|
|
2
2
|
module ScoutApm
|
3
3
|
module Serializers
|
4
4
|
class PayloadSerializer
|
5
|
-
def self.serialize(metrics, slow_transactions)
|
6
|
-
Marshal.dump(:metrics => metrics, :slow_transactions => slow_transactions)
|
5
|
+
def self.serialize(metadata, metrics, slow_transactions)
|
6
|
+
Marshal.dump(:metadata => metadata, :metrics => metrics, :slow_transactions => slow_transactions)
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.deserialize(data)
|
data/lib/scout_apm/version.rb
CHANGED
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: 0.9.
|
4
|
+
version: 0.9.3pre1
|
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: 2015-10-
|
12
|
+
date: 2015-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- lib/scout_apm/utils/sql_sanitizer_regex.rb
|
122
122
|
- lib/scout_apm/utils/sql_sanitizer_regex_1_8_7.rb
|
123
123
|
- lib/scout_apm/utils/time.rb
|
124
|
+
- lib/scout_apm/utils/unique_id.rb
|
124
125
|
- lib/scout_apm/version.rb
|
125
126
|
- scout_apm.gemspec
|
126
127
|
- test/data/config_test_1.yml
|
@@ -144,9 +145,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
145
|
version: '0'
|
145
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
147
|
requirements:
|
147
|
-
- - "
|
148
|
+
- - ">"
|
148
149
|
- !ruby/object:Gem::Version
|
149
|
-
version:
|
150
|
+
version: 1.3.1
|
150
151
|
requirements: []
|
151
152
|
rubyforge_project: scout_apm
|
152
153
|
rubygems_version: 2.2.2
|