skylight 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/ext/libskylight.yml +4 -4
- data/ext/skylight_native.c +25 -0
- data/lib/skylight/config.rb +5 -2
- data/lib/skylight/instrumenter.rb +5 -10
- data/lib/skylight/normalizers.rb +4 -0
- data/lib/skylight/subscriber.rb +14 -1
- data/lib/skylight/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24be9df7072117a45c6e4396a7d164551ca75fc7
|
4
|
+
data.tar.gz: ca45a492d94fdef72c28a3737c873e30a1e6a735
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb70e2c9aeb62bb59df1c1070218cdd18301a8d3280d515969b51751fcf9aedbde0af55b772a96eaa0d0a0b53ab8b38dfe3ef87631721b3545ec4b2270aeeb82
|
7
|
+
data.tar.gz: 9d9f034c346ff2ae0c1629092ccdc349d08a598f5ad21c4b78d8fe006bf7ddd641a77a0019b902133867ccb8bb1298f22167cd6d734189df904a1cf948e7cb48
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 0.8.1 (October 1, 2015)
|
2
|
+
|
3
|
+
* [BUGFIX] Fix agent on OS X El Capitan.
|
4
|
+
* [PERFORMANCE] Explicitly subscribe to normalized events
|
5
|
+
* [IMPROVEMENT] Use native unique description tracking
|
6
|
+
* [IMPROVEMENT] Native SQL: Support multistatement queries
|
7
|
+
|
1
8
|
## 0.8.0 (August 13, 2015)
|
2
9
|
|
3
10
|
* [FEATURE] Add Grape instumentation. See http://docs.skylight.io/grape
|
data/ext/libskylight.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
|
-
version: "0.7.0-
|
2
|
+
version: "0.7.0-6aad54d"
|
3
3
|
checksums:
|
4
|
-
x86-linux: "
|
5
|
-
x86_64-linux: "
|
6
|
-
x86_64-darwin: "
|
4
|
+
x86-linux: "a3a16d2de1070d455dae8e46f95c8fa3621adfb062f7b23d629df870d6d7b385"
|
5
|
+
x86_64-linux: "c62bcb68c124c5664cf22254c17db68b7f7a3fe6da9148a3f49c546449a9e766"
|
6
|
+
x86_64-darwin: "bb42c08044a94332a69c7d343273488d44ed7c85d3f1e2f37834f4ed6cdd178d"
|
data/ext/skylight_native.c
CHANGED
@@ -236,6 +236,30 @@ instrumenter_submit_trace(VALUE self, VALUE rb_trace) {
|
|
236
236
|
return Qnil;
|
237
237
|
}
|
238
238
|
|
239
|
+
static VALUE
|
240
|
+
instrumenter_track_desc(VALUE self, VALUE rb_endpoint, VALUE rb_desc) {
|
241
|
+
int tracked;
|
242
|
+
sky_instrumenter_t* instrumenter;
|
243
|
+
|
244
|
+
CHECK_TYPE(rb_endpoint, T_STRING);
|
245
|
+
CHECK_TYPE(rb_desc, T_STRING);
|
246
|
+
|
247
|
+
tracked = 0;
|
248
|
+
|
249
|
+
My_Struct(instrumenter, sky_instrumenter_t, no_instrumenter_msg);
|
250
|
+
|
251
|
+
CHECK_FFI(
|
252
|
+
sky_instrumenter_track_desc(instrumenter, STR2BUF(rb_endpoint), STR2BUF(rb_desc), &tracked),
|
253
|
+
"native Instrumenter#track_desc failed");
|
254
|
+
|
255
|
+
if (tracked) {
|
256
|
+
return Qtrue;
|
257
|
+
}
|
258
|
+
else {
|
259
|
+
return Qfalse;
|
260
|
+
}
|
261
|
+
}
|
262
|
+
|
239
263
|
/*
|
240
264
|
*
|
241
265
|
* class Skylight::Trace
|
@@ -460,4 +484,5 @@ void Init_skylight_native() {
|
|
460
484
|
rb_define_method(rb_cInstrumenter, "native_start", instrumenter_start, 0);
|
461
485
|
rb_define_method(rb_cInstrumenter, "native_stop", instrumenter_stop, 0);
|
462
486
|
rb_define_method(rb_cInstrumenter, "native_submit_trace", instrumenter_submit_trace, 1);
|
487
|
+
rb_define_method(rb_cInstrumenter, "native_track_desc", instrumenter_track_desc, 2);
|
463
488
|
}
|
data/lib/skylight/config.rb
CHANGED
@@ -86,8 +86,6 @@ module Skylight
|
|
86
86
|
:'auth_url' => 'https://auth.skylight.io/agent',
|
87
87
|
:'sql_mode' => 'ruby',
|
88
88
|
:'daemon.lazy_start' => true,
|
89
|
-
:'daemon.ssl_cert_path' => Util::SSL.ca_cert_file_or_default,
|
90
|
-
:'daemon.ssl_cert_dir' => Util::SSL.ca_cert_dir,
|
91
89
|
|
92
90
|
# == Legacy ==
|
93
91
|
:'log_file' => '-'.freeze,
|
@@ -111,6 +109,11 @@ module Skylight
|
|
111
109
|
:'metrics.report_interval' => 60
|
112
110
|
}
|
113
111
|
|
112
|
+
if Skylight::Util::Platform::OS != 'darwin'
|
113
|
+
DEFAULTS[:'daemon.ssl_cert_path'] = Util::SSL.ca_cert_file_or_default
|
114
|
+
DEFAULTS[:'daemon.ssl_cert_dir'] = Util::SSL.ca_cert_dir
|
115
|
+
end
|
116
|
+
|
114
117
|
if Skylight.native?
|
115
118
|
native_path = Skylight.libskylight_path
|
116
119
|
|
@@ -7,7 +7,6 @@ module Skylight
|
|
7
7
|
class Instrumenter
|
8
8
|
KEY = :__skylight_current_trace
|
9
9
|
LOCK = Mutex.new
|
10
|
-
DESC_LOCK = Mutex.new
|
11
10
|
|
12
11
|
TOO_MANY_UNIQUES = "<too many unique descriptions>"
|
13
12
|
|
@@ -87,7 +86,6 @@ module Skylight
|
|
87
86
|
@subscriber = Subscriber.new(config, self)
|
88
87
|
|
89
88
|
@trace_info = @config[:trace_info] || TraceInfo.new
|
90
|
-
@descriptions = Hash.new { |h,k| h[k] = {} }
|
91
89
|
end
|
92
90
|
|
93
91
|
def current_trace
|
@@ -227,15 +225,12 @@ module Skylight
|
|
227
225
|
def limited_description(description)
|
228
226
|
endpoint = @trace_info.current.endpoint
|
229
227
|
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
228
|
+
if description
|
229
|
+
if native_track_desc(endpoint, description)
|
230
|
+
description
|
231
|
+
else
|
232
|
+
TOO_MANY_UNIQUES
|
235
233
|
end
|
236
|
-
|
237
|
-
set[description] = true
|
238
|
-
description
|
239
234
|
end
|
240
235
|
end
|
241
236
|
|
data/lib/skylight/normalizers.rb
CHANGED
data/lib/skylight/subscriber.rb
CHANGED
@@ -14,7 +14,8 @@ module Skylight
|
|
14
14
|
|
15
15
|
def register!
|
16
16
|
unregister! if @subscriber
|
17
|
-
|
17
|
+
pattern = ArrayPattern.new(@normalizers.keys)
|
18
|
+
@subscriber = ActiveSupport::Notifications.subscribe pattern, self
|
18
19
|
end
|
19
20
|
|
20
21
|
def unregister!
|
@@ -22,6 +23,18 @@ module Skylight
|
|
22
23
|
@subscriber = nil
|
23
24
|
end
|
24
25
|
|
26
|
+
class ArrayPattern
|
27
|
+
|
28
|
+
def initialize(keys)
|
29
|
+
@keys = Set.new keys
|
30
|
+
end
|
31
|
+
|
32
|
+
def ===(item)
|
33
|
+
@keys.include?(item)
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
25
38
|
#
|
26
39
|
#
|
27
40
|
# ===== ActiveSupport::Notifications API
|
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.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilde, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|