skylight 0.10.3 → 0.10.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -1
- data/LICENSE.md +1 -1
- data/ext/libskylight.yml +4 -4
- data/lib/skylight/cli.rb +7 -2
- data/lib/skylight/config.rb +4 -0
- data/lib/skylight/core.rb +3 -1
- data/lib/skylight/middleware.rb +7 -0
- data/lib/skylight/normalizers/active_model_serializers/render.rb +3 -1
- data/lib/skylight/probes/sequel.rb +8 -5
- data/lib/skylight/probes/sinatra.rb +3 -1
- data/lib/skylight/railtie.rb +1 -1
- data/lib/skylight/user_config.rb +1 -1
- data/lib/skylight/util/logging.rb +1 -0
- data/lib/skylight/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a76099fda886af0e74d06bed09f512715705be0a
|
4
|
+
data.tar.gz: 7f926a22b2da10ecc498995ada0ddc5b48d2b510
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c054668e4feec17241dbbcfbc6ddb1bf8808d7d718f10a1449940c056ecfdb3d26a2ddfe805e0d0c81d880eb949b699f517687e3cf13eda242bba4e287a5a1c0
|
7
|
+
data.tar.gz: 35516e9b5e0cec82a57d1e04e759787a301123b223c9a00d0ae829d2e116f1a1d85154bd79ed962e2229e92757ed36919d25efe55bea5ac608fc640ea51e6771
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## 0.10.4 (June 3, 2016)
|
2
|
+
|
3
|
+
* [BUGFIX] Sinatra instrumenation now works for latest master
|
4
|
+
* [BUGFIX] Sequel support for 4.35.0
|
5
|
+
* [BUGFIX] Handle latest ActiveModel::Serializers version
|
6
|
+
* [BUGFIX] More precise check for existence of Rails
|
7
|
+
* [BREAKING] Drop official support for Sinatra 1.2 (it likely never worked correctly)
|
8
|
+
* [IMPROVEMENT] On Heroku, logs are now written to STDOUT
|
9
|
+
* [IMPROVEMENT] Allow Skylight to raise on logged errors, useful for testing and debugging
|
10
|
+
* [IMPROVEMENT] Finish Rack::Responses in Middleware
|
11
|
+
* [IMRPOVEMENT] Better message when config/skylight.yml already exists
|
12
|
+
* [IMPROVEMENT] Update Rust Agent with SQL improvements
|
13
|
+
|
1
14
|
## 0.10.3 (February 2, 2016)
|
2
15
|
|
3
16
|
* [BUGFIX] Don't validate configuration on disabled environments.
|
@@ -22,7 +35,7 @@
|
|
22
35
|
|
23
36
|
## 0.9.4 (November 23, 2015)
|
24
37
|
|
25
|
-
* [FEATURE] Added instrumentation for official Mongo Ruby Driver (utilized by Mongoid 5+). Add 'mongo' to probes list to enable.
|
38
|
+
* [FEATURE] Added instrumentation for official Mongo Ruby Driver (utilized by Mongoid 5+). Add 'mongo' to probes list to enable.
|
26
39
|
* [BUGFIX] SQL lexer now handles indentifiers beginning with underscores.
|
27
40
|
* [BUGFIX] Excon instrumentation now works correctly.
|
28
41
|
* [BUGFIX] Graceful handling of native agent failures on old OS X versions.
|
data/LICENSE.md
CHANGED
data/ext/libskylight.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
|
-
version: "0.
|
2
|
+
version: "1.0.0-4a74d28"
|
3
3
|
checksums:
|
4
|
-
x86-linux: "
|
5
|
-
x86_64-linux: "
|
6
|
-
x86_64-darwin: "
|
4
|
+
x86-linux: "66e1b9fd8c9223febf8e7febb56a2ad71714ab61193d153e2bf0f462409cb4f7"
|
5
|
+
x86_64-linux: "40d7e0822610244d916df5488a83af5bdc7b2aa8b2410abc672a42cfab629f3f"
|
6
|
+
x86_64-darwin: "1484612b150317f1debdcaeab9bea806749d8be9ac132b8cd1b92781d1972b46"
|
data/lib/skylight/cli.rb
CHANGED
@@ -13,7 +13,12 @@ module Skylight
|
|
13
13
|
desc "setup TOKEN", "Sets up a new app using the provided token"
|
14
14
|
def setup(token=nil)
|
15
15
|
if File.exist?(config_path)
|
16
|
-
say
|
16
|
+
say <<-OUT, :green
|
17
|
+
A config/skylight.yml already exists for your application.
|
18
|
+
|
19
|
+
Visit your app at https://www.skylight.io/app or remove config/skylight.yml
|
20
|
+
to set it up as a new app in Skylight.
|
21
|
+
OUT
|
17
22
|
return
|
18
23
|
end
|
19
24
|
|
@@ -39,7 +44,7 @@ The next step is for you to deploy your application to production. The
|
|
39
44
|
easiest way is to just commit the config file to your source control
|
40
45
|
repository and deploy from there. You can learn more about the process at:
|
41
46
|
|
42
|
-
http://docs.skylight.io/getting-
|
47
|
+
http://docs.skylight.io/getting-set-up/#deployment
|
43
48
|
|
44
49
|
If you want to specify the authentication token as an environment variable,
|
45
50
|
you should set the `SKYLIGHT_AUTHENTICATION` variable to:
|
data/lib/skylight/config.rb
CHANGED
data/lib/skylight/core.rb
CHANGED
@@ -7,7 +7,9 @@ module Skylight
|
|
7
7
|
# Load the native agent
|
8
8
|
require 'skylight/native'
|
9
9
|
|
10
|
-
|
10
|
+
# Specifically check for Railtie since we've had at least one case of a
|
11
|
+
# customer having Rails defined without having all of Rails loaded.
|
12
|
+
if defined?(Rails::Railtie)
|
11
13
|
require 'skylight/railtie'
|
12
14
|
end
|
13
15
|
|
data/lib/skylight/middleware.rb
CHANGED
@@ -59,6 +59,13 @@ module Skylight
|
|
59
59
|
t { "middleware beginning trace" }
|
60
60
|
trace = Skylight.trace "Rack", 'app.rack.request'
|
61
61
|
resp = @app.call(env)
|
62
|
+
|
63
|
+
# Responses should be finished but in some situations they aren't
|
64
|
+
# e.g. https://github.com/ruby-grape/grape/issues/1041
|
65
|
+
if resp.respond_to?(:finish)
|
66
|
+
resp = resp.finish
|
67
|
+
end
|
68
|
+
|
62
69
|
resp[2] = BodyProxy.new(resp[2]) { trace.submit } if trace
|
63
70
|
resp
|
64
71
|
rescue Exception
|
@@ -12,7 +12,9 @@ module Skylight
|
|
12
12
|
title = serializer_class.name.sub(/^ActiveModel::(Serializer::)?/, '')
|
13
13
|
|
14
14
|
if adapter_instance = payload[:adapter]
|
15
|
-
adapter_name = adapter_instance.class.name
|
15
|
+
adapter_name = adapter_instance.class.name
|
16
|
+
.sub(/^ActiveModel::Serializer::Adapter::/, '')
|
17
|
+
.sub(/^ActiveModelSerializers::Adapter::/, '')
|
16
18
|
desc = "Adapter: #{adapter_name}"
|
17
19
|
end
|
18
20
|
|
@@ -5,11 +5,14 @@ module Skylight
|
|
5
5
|
class Probe
|
6
6
|
def install
|
7
7
|
require 'sequel/database/logging'
|
8
|
-
::Sequel::Database.class_eval do
|
9
|
-
alias log_yield_without_sk log_yield
|
10
8
|
|
11
|
-
|
12
|
-
|
9
|
+
method_name = ::Sequel::Database.method_defined?(:log_connection_yield) ? 'log_connection_yield' : 'log_yield'
|
10
|
+
|
11
|
+
::Sequel::Database.class_eval <<-end_eval
|
12
|
+
alias #{method_name}_without_sk #{method_name}
|
13
|
+
|
14
|
+
def #{method_name}(sql, *args, &block)
|
15
|
+
#{method_name}_without_sk(sql, *args) do
|
13
16
|
::ActiveSupport::Notifications.instrument(
|
14
17
|
"sql.sequel",
|
15
18
|
sql: sql,
|
@@ -20,7 +23,7 @@ module Skylight
|
|
20
23
|
end
|
21
24
|
end
|
22
25
|
end
|
23
|
-
|
26
|
+
end_eval
|
24
27
|
end
|
25
28
|
end
|
26
29
|
end
|
@@ -8,7 +8,9 @@ module Skylight
|
|
8
8
|
alias compile_without_sk! compile!
|
9
9
|
|
10
10
|
def compile!(verb, path, *args, &block)
|
11
|
-
compile_without_sk!(verb, path, *args, &block).tap do |_, _,
|
11
|
+
compile_without_sk!(verb, path, *args, &block).tap do |_, _, keys_or_wrapper, wrapper|
|
12
|
+
wrapper ||= keys_or_wrapper
|
13
|
+
|
12
14
|
# Deal with the situation where the path is a regex, and the default behavior
|
13
15
|
# of Ruby stringification produces an unreadable mess
|
14
16
|
if path.is_a?(Regexp)
|
data/lib/skylight/railtie.rb
CHANGED
@@ -88,7 +88,7 @@ module Skylight
|
|
88
88
|
# Configure the log file destination
|
89
89
|
if log_file = app.config.skylight.log_file
|
90
90
|
config['log_file'] = log_file
|
91
|
-
elsif !config.key?('log_file')
|
91
|
+
elsif !config.key?('log_file') && !config.on_heroku?
|
92
92
|
config['log_file'] = File.join(Rails.root, 'log/skylight.log')
|
93
93
|
end
|
94
94
|
|
data/lib/skylight/user_config.rb
CHANGED
data/lib/skylight/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skylight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilde, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.
|
188
|
+
rubygems_version: 2.5.2
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: Skylight is a smart profiler for Rails apps
|