oboe 2.7.7.1-java → 2.7.8.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -0
- data/Gemfile +5 -1
- data/lib/joboe_metal.rb +6 -3
- data/lib/oboe/api/logging.rb +25 -1
- data/lib/oboe/base.rb +2 -2
- data/lib/oboe/inst/rack.rb +2 -7
- data/lib/oboe/version.rb +1 -1
- data/lib/oboe_metal.rb +18 -8
- data/test/frameworks/apps/grape_simple.rb +0 -1
- data/test/instrumentation/rack_test.rb +2 -0
- metadata +22 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62cd3db82e213327668a85173155c2a26f7283ec
|
4
|
+
data.tar.gz: e5c55906ad783742b8af7d35aa0e008eea6c4f38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a54753774a6c4ca87119e5dba44a7bb0f71c78358477fe084e0b40327e297074039e471cf85e6678c787c54d608af24f5278350d5de68394d3960db59ff6b96
|
7
|
+
data.tar.gz: bf1813f9ff669b8744bc3633df3d5457c5d72660b44b3215d1c3a7262c01903bb809c7bb668b95d2ac450594cd5824f5a4661b14833d4110fa17f2f9345e0578
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,41 @@ https://github.com/appneta/oboe-ruby/releases
|
|
4
4
|
|
5
5
|
Dates in this file are in the format MM/DD/YYYY.
|
6
6
|
|
7
|
+
# oboe 2.7.8.1
|
8
|
+
|
9
|
+
This patch release includes:
|
10
|
+
|
11
|
+
* Improved sampling management and reporting
|
12
|
+
|
13
|
+
Pushed to Rubygems:
|
14
|
+
|
15
|
+
https://rubygems.org/gems/oboe/versions/2.7.8.1
|
16
|
+
https://rubygems.org/gems/oboe/versions/2.7.8.1-java
|
17
|
+
|
18
|
+
|
19
|
+
# oboe 2.7.7.1
|
20
|
+
|
21
|
+
This patch release includes:
|
22
|
+
|
23
|
+
* Add support and instrumentation for Sequel: #91
|
24
|
+
|
25
|
+
Pushed to Rubygems:
|
26
|
+
|
27
|
+
https://rubygems.org/gems/oboe/versions/2.7.7.1
|
28
|
+
https://rubygems.org/gems/oboe/versions/2.7.7.1-java
|
29
|
+
|
30
|
+
# oboe 2.7.6.2
|
31
|
+
|
32
|
+
This patch release includes:
|
33
|
+
|
34
|
+
* Fixed metrics when hosting a JRuby application under a Java webserver such as Tomcat: #94
|
35
|
+
* Fix for moped aggregate calls: #95
|
36
|
+
|
37
|
+
Pushed to Rubygems:
|
38
|
+
|
39
|
+
https://rubygems.org/gems/oboe/versions/2.7.6.2
|
40
|
+
https://rubygems.org/gems/oboe/versions/2.7.6.2-java
|
41
|
+
|
7
42
|
# oboe 2.7.5.1 (11/20/2014)
|
8
43
|
|
9
44
|
This patch release includes:
|
data/Gemfile
CHANGED
data/lib/joboe_metal.rb
CHANGED
@@ -153,14 +153,17 @@ module Oboe
|
|
153
153
|
# Store the returned SampleRateConfig into Oboe::Config
|
154
154
|
if sr_cfg
|
155
155
|
begin
|
156
|
-
Oboe.sample_rate =
|
157
|
-
Oboe.sample_source =
|
156
|
+
Oboe::Config.sample_rate = cfg.sampleRate
|
157
|
+
Oboe::Config.sample_source = cfg.sampleRateSourceValue
|
158
158
|
# If we fail here, we do so quietly. This was we don't spam logs
|
159
159
|
# on every request
|
160
160
|
end
|
161
|
+
else
|
162
|
+
Oboe.sample_rate = -1
|
163
|
+
Oboe.sample_source = -1
|
161
164
|
end
|
162
165
|
|
163
|
-
sr_cfg
|
166
|
+
sr_cfg ? true : false
|
164
167
|
rescue => e
|
165
168
|
Oboe.logger.debug "[oboe/debug] #{e.message}"
|
166
169
|
false
|
data/lib/oboe/api/logging.rb
CHANGED
@@ -69,9 +69,33 @@ module Oboe
|
|
69
69
|
Oboe::Context.fromString(xtrace) if Oboe.pickup_context?(xtrace)
|
70
70
|
|
71
71
|
if Oboe.tracing?
|
72
|
+
# Pre-existing context. Either we inherited context from an
|
73
|
+
# incoming X-Trace request header or under JRuby, Joboe started
|
74
|
+
# tracing before the JRuby code was called (e.g. Tomcat)
|
72
75
|
Oboe.is_continued_trace = true
|
76
|
+
|
77
|
+
if Oboe.has_xtrace_header
|
78
|
+
opts[:TraceOrigin] = :continued_header
|
79
|
+
elsif Oboe.has_incoming_context
|
80
|
+
opts[:TraceOrigin] = :continued_context
|
81
|
+
else
|
82
|
+
opts[:TraceOrigin] = :continued
|
83
|
+
end
|
84
|
+
|
73
85
|
log_entry(layer, opts)
|
74
|
-
|
86
|
+
|
87
|
+
elsif opts.key?('Force')
|
88
|
+
# Forced tracing: used by __Init reporting
|
89
|
+
opts[:TraceOrigin] = :forced
|
90
|
+
log_event(layer, 'entry', Oboe::Context.startTrace, opts)
|
91
|
+
|
92
|
+
elsif Oboe.sample?(opts.merge(:layer => layer, :xtrace => xtrace))
|
93
|
+
# Probablistic tracing of a subset of requests based off of
|
94
|
+
# sample rate and sample source
|
95
|
+
opts[:SampleRate] = Oboe.sample_rate
|
96
|
+
opts[:SampleSource] = Oboe.sample_source
|
97
|
+
opts[:TraceOrigin] = :always_sampled
|
98
|
+
|
75
99
|
log_event(layer, 'entry', Oboe::Context.startTrace, opts)
|
76
100
|
end
|
77
101
|
end
|
data/lib/oboe/base.rb
CHANGED
data/lib/oboe/inst/rack.rb
CHANGED
@@ -37,6 +37,8 @@ module Oboe
|
|
37
37
|
report_kvs['Forwarded-Port'] = env['HTTP_X_FORWARDED_PORT'] if env.key?('HTTP_X_FORWARDED_PORT')
|
38
38
|
|
39
39
|
report_kvs['Ruby.Oboe.Version'] = ::Oboe::Version::STRING
|
40
|
+
report_kvs['ProcessID'] = Process.pid
|
41
|
+
report_kvs['ThreadID'] = Thread.current.to_s[/0x\w*/]
|
40
42
|
rescue StandardError => e
|
41
43
|
# Discard any potential exceptions. Debug log and report whatever we can.
|
42
44
|
Oboe.logger.debug "[oboe/debug] Rack KV collection error: #{e.inspect}"
|
@@ -50,13 +52,6 @@ module Oboe
|
|
50
52
|
report_kvs = {}
|
51
53
|
report_kvs[:URL] = URI.unescape(req.path)
|
52
54
|
|
53
|
-
if Oboe.always?
|
54
|
-
# Only report these KVs under tracing_mode 'always' (never for 'through')
|
55
|
-
# These KVs need to be in the entry event for server side.
|
56
|
-
report_kvs[:SampleRate] = Oboe.sample_rate
|
57
|
-
report_kvs[:SampleSource] = Oboe.sample_source
|
58
|
-
end
|
59
|
-
|
60
55
|
# Under JRuby, JOboe may have already started a trace. Make note of this
|
61
56
|
# if so and don't clear context on log_end (see oboe/api/logging.rb)
|
62
57
|
Oboe.has_incoming_context = Oboe.tracing?
|
data/lib/oboe/version.rb
CHANGED
data/lib/oboe_metal.rb
CHANGED
@@ -85,7 +85,7 @@ module Oboe
|
|
85
85
|
class << self
|
86
86
|
def sample?(opts = {})
|
87
87
|
begin
|
88
|
-
return false unless Oboe.always?
|
88
|
+
return false unless Oboe.always? && Oboe.loaded
|
89
89
|
|
90
90
|
# Assure defaults since SWIG enforces Strings
|
91
91
|
layer = opts[:layer] ? opts[:layer].strip : ''
|
@@ -94,13 +94,23 @@ module Oboe
|
|
94
94
|
|
95
95
|
rv = Oboe::Context.sampleRequest(layer, xtrace, tv_meta)
|
96
96
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
97
|
+
if rv == 0
|
98
|
+
if ENV.key?('OBOE_GEM_TEST')
|
99
|
+
# When in test, always trace and don't clear
|
100
|
+
# the stored sample rate/source
|
101
|
+
true
|
102
|
+
else
|
103
|
+
Oboe.sample_rate = -1
|
104
|
+
Oboe.sample_source = -1
|
105
|
+
false
|
106
|
+
end
|
107
|
+
else
|
108
|
+
# liboboe version > 1.3.1 returning a bit masked integer with SampleRate and
|
109
|
+
# source embedded
|
110
|
+
Oboe.sample_rate = (rv & SAMPLE_RATE_MASK)
|
111
|
+
Oboe.sample_source = (rv & SAMPLE_SOURCE_MASK) >> 24
|
112
|
+
true
|
113
|
+
end
|
104
114
|
rescue StandardError => e
|
105
115
|
Oboe.logger.debug "[oboe/error] sample? error: #{e.inspect}"
|
106
116
|
false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oboe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.8.1
|
5
5
|
platform: java
|
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:
|
12
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -186,35 +186,35 @@ specification_version: 4
|
|
186
186
|
summary: AppNeta TraceView performance instrumentation gem for Ruby
|
187
187
|
test_files:
|
188
188
|
- test/minitest_helper.rb
|
189
|
-
- test/support/config_test.rb
|
190
|
-
- test/support/xtrace_test.rb
|
191
|
-
- test/support/liboboe_settings_test.rb
|
192
|
-
- test/profiling/method_test.rb
|
193
|
-
- test/frameworks/sinatra_test.rb
|
194
189
|
- test/frameworks/grape_test.rb
|
195
190
|
- test/frameworks/padrino_test.rb
|
191
|
+
- test/frameworks/sinatra_test.rb
|
196
192
|
- test/frameworks/apps/sinatra_simple.rb
|
197
|
-
- test/frameworks/apps/grape_simple.rb
|
198
193
|
- test/frameworks/apps/padrino_simple.rb
|
199
|
-
- test/
|
200
|
-
- test/instrumentation/
|
201
|
-
- test/instrumentation/rack_test.rb
|
202
|
-
- test/instrumentation/http_test.rb
|
194
|
+
- test/frameworks/apps/grape_simple.rb
|
195
|
+
- test/instrumentation/mongo_test.rb
|
203
196
|
- test/instrumentation/redis_hashes_test.rb
|
204
|
-
- test/instrumentation/
|
197
|
+
- test/instrumentation/sequel_pg_test.rb
|
205
198
|
- test/instrumentation/redis_misc_test.rb
|
206
|
-
- test/instrumentation/
|
207
|
-
- test/instrumentation/memcached_test.rb
|
199
|
+
- test/instrumentation/dalli_test.rb
|
208
200
|
- test/instrumentation/redis_keys_test.rb
|
201
|
+
- test/instrumentation/redis_sortedsets_test.rb
|
202
|
+
- test/instrumentation/redis_strings_test.rb
|
203
|
+
- test/instrumentation/sequel_mysql_test.rb
|
204
|
+
- test/instrumentation/redis_sets_test.rb
|
205
|
+
- test/instrumentation/http_test.rb
|
209
206
|
- test/instrumentation/typhoeus_test.rb
|
210
207
|
- test/instrumentation/resque_test.rb
|
208
|
+
- test/instrumentation/em_http_request_test.rb
|
209
|
+
- test/instrumentation/moped_test.rb
|
210
|
+
- test/instrumentation/rack_test.rb
|
211
|
+
- test/instrumentation/memcache_test.rb
|
211
212
|
- test/instrumentation/faraday_test.rb
|
212
|
-
- test/instrumentation/redis_sortedsets_test.rb
|
213
|
-
- test/instrumentation/dalli_test.rb
|
214
|
-
- test/instrumentation/sequel_mysql_test.rb
|
215
213
|
- test/instrumentation/redis_lists_test.rb
|
216
|
-
- test/instrumentation/cassandra_test.rb
|
217
|
-
- test/instrumentation/redis_strings_test.rb
|
218
|
-
- test/instrumentation/sequel_pg_test.rb
|
219
|
-
- test/instrumentation/mongo_test.rb
|
220
214
|
- test/instrumentation/sequel_mysql2_test.rb
|
215
|
+
- test/instrumentation/cassandra_test.rb
|
216
|
+
- test/instrumentation/memcached_test.rb
|
217
|
+
- test/profiling/method_test.rb
|
218
|
+
- test/support/liboboe_settings_test.rb
|
219
|
+
- test/support/config_test.rb
|
220
|
+
- test/support/xtrace_test.rb
|