raygun-apm 1.0.41-universal-darwin → 1.0.46-universal-darwin
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/bin/diagnostics +7 -0
- data/ext/raygun/extconf.rb +1 -0
- data/lib/raygun/2.5/raygun_ext.bundle +0 -0
- data/lib/raygun/2.6/raygun_ext.bundle +0 -0
- data/lib/raygun/2.7/raygun_ext.bundle +0 -0
- data/lib/raygun/apm.rb +3 -0
- data/lib/raygun/apm/blacklist.rb +378 -192
- data/lib/raygun/apm/blacklist/parser.rb +47 -0
- data/lib/raygun/apm/blacklist/translator.rb +73 -0
- data/lib/raygun/apm/config.rb +2 -1
- data/lib/raygun/apm/diagnostics.rb +34 -0
- data/lib/raygun/apm/event.rb +1 -1
- data/lib/raygun/apm/tracer.rb +36 -33
- data/lib/raygun/apm/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10cb3e9bb68193b2981d1a9cc8b12952a2c25bf95f91dda9a61b98396dcec5b8
|
4
|
+
data.tar.gz: 40c2a8f54ac62da87940c1595a000b1e779e9ba460ec21497e4f32a456458c60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82cba1020def7e3edc02593d73787fd8ad08b37a7605877579db6bbd083335fcf1e51eaab055f0fe3e7c84fbe6fa3c3d99356bd2e7af96c4cbcbd1cf8c957e6b
|
7
|
+
data.tar.gz: 36d2cb2cf9e968a781b61a6644aa39072a7ea7627fbf54f87cf0ac38afaca77b48ce32c372112cc7a5179f52ebc10b79e0af4533d4eb39edb18022893568a155
|
data/bin/diagnostics
ADDED
data/ext/raygun/extconf.rb
CHANGED
Binary file
|
Binary file
|
Binary file
|
data/lib/raygun/apm.rb
CHANGED
@@ -6,6 +6,9 @@ rescue LoadError
|
|
6
6
|
require "raygun/raygun_ext"
|
7
7
|
end
|
8
8
|
require "raygun/apm/config"
|
9
|
+
require "raygun/apm/diagnostics"
|
10
|
+
require "raygun/apm/blacklist/parser"
|
11
|
+
require "raygun/apm/blacklist/translator"
|
9
12
|
require "raygun/apm/tracer"
|
10
13
|
require "raygun/apm/event"
|
11
14
|
require "raygun/apm/hooks/net_http"
|
data/lib/raygun/apm/blacklist.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
module Raygun
|
2
2
|
module Apm
|
3
|
-
|
3
|
+
module Blacklist
|
4
4
|
PROFILER = %w{
|
5
|
+
Raygun
|
5
6
|
Raygun::Apm::
|
6
7
|
}
|
7
8
|
|
@@ -11,224 +12,409 @@ module Raygun
|
|
11
12
|
#<Module:
|
12
13
|
#<Class:
|
13
14
|
#<#<Class:
|
14
|
-
ARGF
|
15
|
-
ArgumentError
|
16
|
-
Array
|
17
|
-
Base64
|
18
|
-
BasicObject
|
19
|
-
Binding
|
20
|
-
Class
|
21
|
-
ClosedQueueError
|
22
|
-
Comparable
|
23
|
-
Complex
|
24
|
-
ConditionVariable
|
25
|
-
Continuation
|
26
|
-
Data
|
27
|
-
Dir
|
28
|
-
ENV
|
29
|
-
EOFError
|
30
|
-
Encoding
|
31
|
-
Encoding::
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
String
|
125
|
-
Struct
|
126
|
-
Symbol
|
127
|
-
SyntaxError
|
128
|
-
SystemCallError
|
129
|
-
SystemExit
|
130
|
-
SystemStackError
|
131
|
-
Thread
|
132
|
-
Thread::Backtrace
|
133
|
-
Thread::Backtrace::Location
|
134
|
-
ThreadError
|
135
|
-
ThreadGroup
|
136
|
-
Time
|
137
|
-
TracePoint
|
138
|
-
TrueClass
|
139
|
-
TypeError
|
140
|
-
UnboundMethod
|
141
|
-
UncaughtThrowError
|
142
|
-
UnicodeNormalize
|
143
|
-
Warning
|
144
|
-
ZeroDivisionError
|
145
|
-
IPAddr
|
15
|
+
ARGF#
|
16
|
+
ArgumentError#
|
17
|
+
Array#
|
18
|
+
Base64#
|
19
|
+
BasicObject#
|
20
|
+
Binding#
|
21
|
+
Class#
|
22
|
+
ClosedQueueError#
|
23
|
+
Comparable#
|
24
|
+
Complex#
|
25
|
+
ConditionVariable#
|
26
|
+
Continuation#
|
27
|
+
Data#
|
28
|
+
Dir#
|
29
|
+
ENV#
|
30
|
+
EOFError#
|
31
|
+
Encoding#
|
32
|
+
Encoding::
|
33
|
+
EncodingError#
|
34
|
+
Enumerable#
|
35
|
+
Enumerator#
|
36
|
+
Enumerator::
|
37
|
+
Errno#
|
38
|
+
Exception#
|
39
|
+
FalseClass#
|
40
|
+
Fiber#
|
41
|
+
FiberError#
|
42
|
+
File#
|
43
|
+
File::
|
44
|
+
FileTest#
|
45
|
+
Float#
|
46
|
+
FloatDomainError#
|
47
|
+
FrozenError#
|
48
|
+
GC#
|
49
|
+
GC::Profiler#
|
50
|
+
Hash#
|
51
|
+
IO#
|
52
|
+
IO::
|
53
|
+
IOError#
|
54
|
+
IndexError#
|
55
|
+
Integer#
|
56
|
+
Interrupt#
|
57
|
+
JSON#
|
58
|
+
Kernel#
|
59
|
+
KeyError#
|
60
|
+
LoadError#
|
61
|
+
LocalJumpError#
|
62
|
+
Marshal#
|
63
|
+
MatchData#
|
64
|
+
Math#
|
65
|
+
Math::
|
66
|
+
Method#
|
67
|
+
Module#
|
68
|
+
Mutex#
|
69
|
+
NameError#
|
70
|
+
NilClass#
|
71
|
+
NoMemoryError#
|
72
|
+
NoMethodError#
|
73
|
+
NotImplementedError#
|
74
|
+
Numeric#
|
75
|
+
Object#
|
76
|
+
ObjectSpace#
|
77
|
+
ObjectSpace::
|
78
|
+
Proc#
|
79
|
+
Process#
|
80
|
+
Process::
|
81
|
+
Psych#
|
82
|
+
Queue#
|
83
|
+
Random#
|
84
|
+
Random::
|
85
|
+
Range#
|
86
|
+
RangeError#
|
87
|
+
Rational#
|
88
|
+
Regexp#
|
89
|
+
RegexpError#
|
90
|
+
RubyVM#
|
91
|
+
RubyVM::
|
92
|
+
RuntimeError#
|
93
|
+
ScriptError#
|
94
|
+
SecurityError#
|
95
|
+
Set#
|
96
|
+
SimpleDelegator#
|
97
|
+
Signal#
|
98
|
+
SignalException#
|
99
|
+
SizedQueue#
|
100
|
+
Socket#
|
101
|
+
StandardError#
|
102
|
+
StopIteration#
|
103
|
+
String#
|
104
|
+
Struct#
|
105
|
+
Symbol#
|
106
|
+
SyntaxError#
|
107
|
+
SystemCallError#
|
108
|
+
SystemExit#
|
109
|
+
SystemStackError#
|
110
|
+
Thread#
|
111
|
+
Thread::
|
112
|
+
ThreadError#
|
113
|
+
ThreadGroup#
|
114
|
+
Timeout
|
115
|
+
Time#
|
116
|
+
TracePoint#
|
117
|
+
TrueClass#
|
118
|
+
TypeError#
|
119
|
+
UnboundMethod#
|
120
|
+
UncaughtThrowError#
|
121
|
+
UnicodeNormalize#
|
122
|
+
Warning#
|
123
|
+
ZeroDivisionError#
|
124
|
+
IPAddr#
|
146
125
|
Net::
|
147
|
-
OpenSSL
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
126
|
+
OpenSSL#
|
127
|
+
OpenSSL::
|
128
|
+
BasicSocket#
|
129
|
+
Forwardable#
|
130
|
+
Gem#
|
131
|
+
FFI#
|
132
|
+
Addrinfo#
|
133
|
+
Open3#
|
134
|
+
Shellwords#
|
135
|
+
WeakRef#
|
136
|
+
RbConfig#
|
137
|
+
Singleton#
|
138
|
+
OpenStruct#
|
139
|
+
Bundler#
|
140
|
+
Delegator#
|
141
|
+
PrettyPrint#
|
142
|
+
PP#
|
143
|
+
Minitest
|
144
|
+
Psych
|
145
|
+
Mutex_m#
|
146
|
+
ERB#
|
147
|
+
ERB::
|
163
148
|
}
|
164
149
|
|
165
150
|
HTTP_OUT = %w{
|
166
|
-
#
|
151
|
+
#Faraday
|
167
152
|
URI
|
168
153
|
MonitorMixin
|
169
154
|
Faraday
|
170
|
-
+Faraday::Connection
|
171
|
-
+Faraday::Connection
|
172
|
-
+Faraday::Connection
|
173
|
-
+Faraday::Connection
|
174
|
-
+Faraday::Connection
|
175
|
-
+Faraday::Connection
|
176
|
-
+Faraday::Connection
|
155
|
+
+Faraday::Connection#get
|
156
|
+
+Faraday::Connection#head
|
157
|
+
+Faraday::Connection#delete
|
158
|
+
+Faraday::Connection#trace
|
159
|
+
+Faraday::Connection#post
|
160
|
+
+Faraday::Connection#put
|
161
|
+
+Faraday::Connection#patch
|
177
162
|
#multipart-post
|
178
163
|
Multipartable
|
179
164
|
SecureRandom
|
180
165
|
Parts
|
181
166
|
CompositeReadIO
|
182
|
-
+Multipartable
|
167
|
+
+Multipartable#initialize
|
183
168
|
#rest-client
|
184
169
|
RestClient
|
185
170
|
Netrc
|
186
171
|
HTTP::CookieJar
|
187
172
|
DomainName
|
188
173
|
HTTP::Accept
|
189
|
-
+RestClient
|
190
|
-
+RestClient
|
191
|
-
+RestClient
|
192
|
-
+RestClient
|
193
|
-
+RestClient
|
194
|
-
+RestClient
|
195
|
-
+RestClient
|
174
|
+
+RestClient.get
|
175
|
+
+RestClient.head
|
176
|
+
+RestClient.delete
|
177
|
+
+RestClient.trace
|
178
|
+
+RestClient.post
|
179
|
+
+RestClient.put
|
180
|
+
+RestClient.patch
|
196
181
|
#excon
|
197
182
|
Excon
|
198
|
-
+Excon
|
199
|
-
+Excon
|
200
|
-
+Excon
|
201
|
-
+Excon
|
202
|
-
+Excon
|
203
|
-
+Excon
|
204
|
-
+Excon
|
183
|
+
+Excon.get
|
184
|
+
+Excon.head
|
185
|
+
+Excon.delete
|
186
|
+
+Excon.trace
|
187
|
+
+Excon.post
|
188
|
+
+Excon.put
|
189
|
+
+Excon.patch
|
205
190
|
#HTTParty
|
206
191
|
HTTParty
|
207
|
-
+HTTParty
|
208
|
-
+HTTParty
|
209
|
-
+HTTParty
|
210
|
-
+HTTParty
|
211
|
-
+HTTParty
|
212
|
-
+HTTParty
|
213
|
-
+HTTParty
|
192
|
+
+HTTParty.get
|
193
|
+
+HTTParty.head
|
194
|
+
+HTTParty.delete
|
195
|
+
+HTTParty.trace
|
196
|
+
+HTTParty.post
|
197
|
+
+HTTParty.put
|
198
|
+
+HTTParty.patch
|
214
199
|
#httpclient
|
215
200
|
HTTPClient
|
216
201
|
HTTP::Message
|
217
|
-
+HTTPClient
|
218
|
-
+HTTPClient
|
219
|
-
+HTTPClient
|
220
|
-
+HTTPClient
|
221
|
-
+HTTPClient
|
222
|
-
+HTTPClient
|
223
|
-
+HTTPClient
|
224
|
-
#
|
225
|
-
+Net::HTTP
|
226
|
-
+Net::HTTP
|
227
|
-
+Net::HTTP
|
202
|
+
+HTTPClient#get
|
203
|
+
+HTTPClient#head
|
204
|
+
+HTTPClient#delete
|
205
|
+
+HTTPClient#trace
|
206
|
+
+HTTPClient#post
|
207
|
+
+HTTPClient#put
|
208
|
+
+HTTPClient#patch
|
209
|
+
#net-http
|
210
|
+
+Net::HTTP.get_response
|
211
|
+
+Net::HTTP.get
|
212
|
+
+Net::HTTP.head
|
213
|
+
+Net::HTTP.delete
|
214
|
+
+Net::HTTP.trace
|
215
|
+
+Net::HTTP.post
|
216
|
+
+Net::HTTP.put
|
217
|
+
+Net::HTTP.patch
|
218
|
+
+Net::HTTP.post_form
|
228
219
|
}
|
229
220
|
|
230
221
|
QUERIES = %w{
|
231
|
-
|
222
|
+
#redis
|
223
|
+
Redis
|
224
|
+
+Redis#auth
|
225
|
+
+Redis#select
|
226
|
+
+Redis#ping
|
227
|
+
+Redis#echo
|
228
|
+
+Redis#bgrewriteaof
|
229
|
+
+Redis#bgsave
|
230
|
+
+Redis#config
|
231
|
+
+Redis#dbsize
|
232
|
+
+Redis#debug
|
233
|
+
+Redis#flushall
|
234
|
+
+Redis#flushdb
|
235
|
+
+Redis#info
|
236
|
+
+Redis#lastsave
|
237
|
+
+Redis#monitor
|
238
|
+
+Redis#save
|
239
|
+
+Redis#shutdown
|
240
|
+
+Redis#slave
|
241
|
+
+Redis#slowlog
|
242
|
+
+Redis#sync
|
243
|
+
+Redis#time
|
244
|
+
+Redis#persist
|
245
|
+
+Redis#expire
|
246
|
+
+Redis#expireat
|
247
|
+
+Redis#ttl
|
248
|
+
+Redis#pexpire
|
249
|
+
+Redis#pexpireat
|
250
|
+
+Redis#pttl
|
251
|
+
+Redis#dump
|
252
|
+
+Redis#restore
|
253
|
+
+Redis#migrate
|
254
|
+
+Redis#del
|
255
|
+
+Redis#unlink
|
256
|
+
+Redis#exists
|
257
|
+
+Redis#keys
|
258
|
+
+Redis#move
|
259
|
+
+Redis#object
|
260
|
+
+Redis#randomkey
|
261
|
+
+Redis#rename
|
262
|
+
+Redis#renamenx
|
263
|
+
+Redis#sort
|
264
|
+
+Redis#type
|
265
|
+
+Redis#decr
|
266
|
+
+Redis#decrby
|
267
|
+
+Redis#incr
|
268
|
+
+Redis#incrby
|
269
|
+
+Redis#incrbyfloat
|
270
|
+
+Redis#set
|
271
|
+
+Redis#multi
|
272
|
+
+Redis#client
|
273
|
+
+Redis#set
|
274
|
+
+Redis#setex
|
275
|
+
+Redis#psetex
|
276
|
+
+Redis#setnx
|
277
|
+
+Redis#mset
|
278
|
+
+Redis#mapped_mset
|
279
|
+
+Redis#msetnx
|
280
|
+
+Redis#mapped_msetnx
|
281
|
+
+Redis#get
|
282
|
+
+Redis#mget
|
283
|
+
+Redis#mapped_mget
|
284
|
+
+Redis#setrange
|
285
|
+
+Redis#getrange
|
286
|
+
+Redis#setbit
|
287
|
+
+Redis#getbit
|
288
|
+
+Redis#append
|
289
|
+
+Redis#bitcount
|
290
|
+
+Redis#bitop
|
291
|
+
+Redis#bitpos
|
292
|
+
+Redis#getset
|
293
|
+
+Redis#strlen
|
294
|
+
+Redis#llen
|
295
|
+
+Redis#lpush
|
296
|
+
+Redis#lpushx
|
297
|
+
+Redis#rpush
|
298
|
+
+Redis#rpushx
|
299
|
+
+Redis#lpop
|
300
|
+
+Redis#rpop
|
301
|
+
+Redis#rpoplpush
|
302
|
+
+Redis#blpop
|
303
|
+
+Redis#brpop
|
304
|
+
+Redis#brpoplpush
|
305
|
+
+Redis#lindex
|
306
|
+
+Redis#linsert
|
307
|
+
+Redis#lrange
|
308
|
+
+Redis#lrem
|
309
|
+
+Redis#lset
|
310
|
+
+Redis#ltrim
|
311
|
+
+Redis#scard
|
312
|
+
+Redis#sadd
|
313
|
+
+Redis#srem
|
314
|
+
+Redis#spop
|
315
|
+
+Redis#srandmember
|
316
|
+
+Redis#smove
|
317
|
+
+Redis#sismember
|
318
|
+
+Redis#smembers
|
319
|
+
+Redis#sdiff
|
320
|
+
+Redis#sdiffstore
|
321
|
+
+Redis#sinter
|
322
|
+
+Redis#sinterstore
|
323
|
+
+Redis#sunion
|
324
|
+
+Redis#sunionstore
|
325
|
+
+Redis#zcard
|
326
|
+
+Redis#zadd
|
327
|
+
+Redis#zincrby
|
328
|
+
+Redis#zrem
|
329
|
+
+Redis#zpopmax
|
330
|
+
+Redis#zpopmin
|
331
|
+
+Redis#bzpopmax
|
332
|
+
+Redis#bzpopmin
|
333
|
+
+Redis#zscore
|
334
|
+
+Redis#zrange
|
335
|
+
+Redis#zrevrange
|
336
|
+
+Redis#zrank
|
337
|
+
+Redis#zrevrank
|
338
|
+
+Redis#zremrangebyrank
|
339
|
+
+Redis#zlexcount
|
340
|
+
+Redis#zrangebylex
|
341
|
+
+Redis#zrevrangebylex
|
342
|
+
+Redis#zrangebyscore
|
343
|
+
+Redis#zrevrangebyscore
|
344
|
+
+Redis#zremrangebyscore
|
345
|
+
+Redis#zcount
|
346
|
+
+Redis#zinterstore
|
347
|
+
+Redis#zunionstore
|
348
|
+
+Redis#hlen
|
349
|
+
+Redis#hset
|
350
|
+
+Redis#hsetnx
|
351
|
+
+Redis#hmset
|
352
|
+
+Redis#mapped_hmset
|
353
|
+
+Redis#hget
|
354
|
+
+Redis#hmget
|
355
|
+
+Redis#mapped_hmget
|
356
|
+
+Redis#hdel
|
357
|
+
+Redis#hexists
|
358
|
+
+Redis#hincrby
|
359
|
+
+Redis#hincrbyfloat
|
360
|
+
+Redis#hkeys
|
361
|
+
+Redis#hvals
|
362
|
+
+Redis#hgetall
|
363
|
+
+Redis#publish
|
364
|
+
+Redis#subscribe
|
365
|
+
+Redis#subscribe_with_timeout
|
366
|
+
+Redis#unsubscribe
|
367
|
+
+Redis#psubscribe
|
368
|
+
+Redis#psubscribe_with_timeout
|
369
|
+
+Redis#punsubscribe
|
370
|
+
+Redis#pubsub
|
371
|
+
+Redis#watch
|
372
|
+
+Redis#unwatch
|
373
|
+
+Redis#pipelined
|
374
|
+
+Redis#multi
|
375
|
+
+Redis#exec
|
376
|
+
+Redis#discard
|
377
|
+
+Redis#script
|
378
|
+
+Redis#eval
|
379
|
+
+Redis#evalsha
|
380
|
+
+Redis#scan
|
381
|
+
+Redis#hscan
|
382
|
+
+Redis#zscan
|
383
|
+
+Redis#sscan
|
384
|
+
+Redis#pfadd
|
385
|
+
+Redis#pfcount
|
386
|
+
+Redis#pfmerge
|
387
|
+
+Redis#geoadd
|
388
|
+
+Redis#geohash
|
389
|
+
+Redis#georadiusbymember
|
390
|
+
+Redis#geopos
|
391
|
+
+Redis#geodist
|
392
|
+
+Redis#xinfo
|
393
|
+
+Redis#xadd
|
394
|
+
+Redis#xtrim
|
395
|
+
+Redis#xdel
|
396
|
+
+Redis#xrange
|
397
|
+
+Redis#xrevrange
|
398
|
+
+Redis#xlen
|
399
|
+
+Redis#xread
|
400
|
+
+Redis#xgroup
|
401
|
+
+Redis#xreadgroup
|
402
|
+
+Redis#xack
|
403
|
+
+Redis#xclaim
|
404
|
+
+Redis#xpending
|
405
|
+
+Redis#sentinel
|
406
|
+
+Redis#cluster
|
407
|
+
+Redis#asking
|
408
|
+
}
|
409
|
+
|
410
|
+
RAYGUN4RUBY = %w{
|
411
|
+
Raygun::Breadcrumbs
|
412
|
+
Raygun::Configuration
|
413
|
+
Raygun.config
|
414
|
+
Raygun.log
|
415
|
+
Raygun.should_report?
|
416
|
+
Raygun::Client
|
417
|
+
+Raygun.track_exception
|
232
418
|
}
|
233
419
|
|
234
420
|
def self.extend_with(list)
|
@@ -240,7 +426,7 @@ module Raygun
|
|
240
426
|
end
|
241
427
|
|
242
428
|
def self.resolve_entries
|
243
|
-
DEFAULT_RUBY + PROFILER + HTTP_OUT + QUERIES + self.extended_blacklist.flatten
|
429
|
+
DEFAULT_RUBY + PROFILER + HTTP_OUT + QUERIES + RAYGUN4RUBY + self.extended_blacklist.flatten
|
244
430
|
end
|
245
431
|
end
|
246
432
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Raygun
|
2
|
+
module Apm
|
3
|
+
module Blacklist
|
4
|
+
class Parser
|
5
|
+
COMMENT = /^#[^<].*/
|
6
|
+
ANONYMOUS = /^#<.*:.*>?/
|
7
|
+
|
8
|
+
def initialize(tracer)
|
9
|
+
@tracer = tracer
|
10
|
+
@translator = Blacklist::Translator.new
|
11
|
+
end
|
12
|
+
|
13
|
+
def add_filters(filters)
|
14
|
+
filters.each do |filter|
|
15
|
+
filter.strip!
|
16
|
+
add_filter(filter)
|
17
|
+
end
|
18
|
+
show_filters
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
def add_filter(filter)
|
23
|
+
if filter =~ COMMENT && filter !~ ANONYMOUS
|
24
|
+
return
|
25
|
+
end
|
26
|
+
if filter.start_with?('+')
|
27
|
+
@tracer.add_whitelist *translate(filter[1..-1])
|
28
|
+
elsif filter.start_with?('-')
|
29
|
+
@tracer.add_blacklist *translate(filter[1..-1])
|
30
|
+
elsif filter.size > 0
|
31
|
+
@tracer.add_blacklist *translate(filter)
|
32
|
+
end
|
33
|
+
rescue => e
|
34
|
+
puts "Failed to add line '#{filter}' to the blacklist (#{e}) #{e.backtrace.join("\n")}"
|
35
|
+
end
|
36
|
+
|
37
|
+
def show_filters
|
38
|
+
@tracer.show_filters if @tracer.config.loglevel == Tracer::LOG_BLACKLIST
|
39
|
+
end
|
40
|
+
|
41
|
+
def translate(filter)
|
42
|
+
@translator.translate(filter)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
module Raygun
|
2
|
+
module Apm
|
3
|
+
module Blacklist
|
4
|
+
class Translator
|
5
|
+
class RubyTranslator
|
6
|
+
# Foo::Bar#baz
|
7
|
+
# Foo::Bar.baz
|
8
|
+
COMMENT = /^#.*/
|
9
|
+
ANONYMOUS = /^#<.*>?/
|
10
|
+
NAMESPACE = /::/
|
11
|
+
NAMESPACE_ONLY = /::$/
|
12
|
+
METHOD = /#|\./
|
13
|
+
LETTER_CASE = /^[A-Z]/
|
14
|
+
|
15
|
+
def translate(filter)
|
16
|
+
path, method = nil, nil
|
17
|
+
if filter !~ COMMENT && filter !~ ANONYMOUS
|
18
|
+
if filter.end_with?("#")
|
19
|
+
path = filter
|
20
|
+
else
|
21
|
+
path, method = filter.split(METHOD)
|
22
|
+
end
|
23
|
+
# .NET fallback
|
24
|
+
return if method =~ LETTER_CASE && !method.start_with?("Ruby")
|
25
|
+
if path == path.downcase
|
26
|
+
method = path
|
27
|
+
path = nil
|
28
|
+
end
|
29
|
+
|
30
|
+
# .NET fallback
|
31
|
+
return if method =~ NAMESPACE
|
32
|
+
[path, method]
|
33
|
+
elsif filter =~ ANONYMOUS
|
34
|
+
_, klass, method = filter.split(METHOD)
|
35
|
+
["##{klass}", method]
|
36
|
+
else
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# References https://raygun.com/documentation/product-guides/apm/blacklist/
|
43
|
+
class DotnetTranslator
|
44
|
+
# Foo.Bar::Baz
|
45
|
+
COMMENT = /^#/
|
46
|
+
NAMESPACE = /\./
|
47
|
+
METHOD = /::/
|
48
|
+
|
49
|
+
def translate(filter)
|
50
|
+
if filter !~ COMMENT
|
51
|
+
path, method = nil, nil
|
52
|
+
path, method = filter.split(METHOD)
|
53
|
+
path.gsub!(NAMESPACE, "::")
|
54
|
+
[path, method]
|
55
|
+
else
|
56
|
+
nil
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def initialize
|
62
|
+
@ruby = RubyTranslator.new
|
63
|
+
@dotnet = DotnetTranslator.new
|
64
|
+
end
|
65
|
+
|
66
|
+
def translate(filter)
|
67
|
+
translated = @ruby.translate(filter)
|
68
|
+
translated ? translated : @dotnet.translate(filter)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
data/lib/raygun/apm/config.rb
CHANGED
@@ -49,9 +49,10 @@ module Raygun
|
|
49
49
|
end
|
50
50
|
|
51
51
|
# Initial constants for ProtonAgentTail.exe
|
52
|
-
UDP_SINK_HOST = '127.0.0.1'
|
52
|
+
UDP_SINK_HOST = TCP_MANAGEMENT_HOST = '127.0.0.1'
|
53
53
|
UDP_SINK_MULTICAST_HOST = '239.100.15.215'
|
54
54
|
UDP_SINK_PORT = 2799
|
55
|
+
TCP_MANAGEMENT_PORT = 2790
|
55
56
|
|
56
57
|
## Enumerate all PROTON_ constants
|
57
58
|
config_var 'PROTON_API_KEY', as: String, default: ''
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "socket"
|
2
|
+
require "json"
|
3
|
+
|
4
|
+
module Raygun
|
5
|
+
module Apm
|
6
|
+
class Diagnostics
|
7
|
+
AGENT_STATE_DOWN = "The Raygun APM Agent appears to not be running on the current host.\nIf not already installed, please consult https://raygun.com/documentation/product-guides/apm/agent/downloads/\nOtherwise refer to https://raygun.com/documentation/product-guides/apm/agent/installation/ for starting the Agent."
|
8
|
+
AGENT_STATE_UP_MISCONFIGURED = "The Raygun APM Agent is running, but misconfigured.\nThe API Key needs to be set through the Raygun_ApiKey environment variable.\nThe API key can be found under 'Application Settings' in the Raygun UI"
|
9
|
+
AGENT_STATE_UP_CONFIGURED = "The Raygun APM Agent is configured properly!"
|
10
|
+
|
11
|
+
def initialize(host: Apm::Config::TCP_MANAGEMENT_HOST, port: Apm::Config::TCP_MANAGEMENT_PORT)
|
12
|
+
@host = host
|
13
|
+
@port = port
|
14
|
+
end
|
15
|
+
|
16
|
+
def verify_agent
|
17
|
+
socket.write "GetAgentInfo"
|
18
|
+
response = JSON.parse(socket.gets)
|
19
|
+
if response['Status'] == 1
|
20
|
+
puts AGENT_STATE_UP_CONFIGURED
|
21
|
+
elsif response['Status'] == 0
|
22
|
+
puts AGENT_STATE_UP_MISCONFIGURED
|
23
|
+
end
|
24
|
+
rescue Errno::ECONNREFUSED
|
25
|
+
puts AGENT_STATE_DOWN
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
def socket
|
30
|
+
@socket ||= s = TCPSocket.new(@host, @port)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/raygun/apm/event.rb
CHANGED
data/lib/raygun/apm/tracer.rb
CHANGED
@@ -18,42 +18,15 @@ module Raygun
|
|
18
18
|
attr_accessor :config
|
19
19
|
|
20
20
|
def initialize(env=ENV)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
[]
|
26
|
-
end
|
27
|
-
add_filters @blacklist
|
28
|
-
# Ignore comments set to false here to account for #<Class: etc. in Rails blacklist
|
29
|
-
add_filters Raygun::Apm::Blacklist.resolve_entries, ignore_comments: false
|
30
|
-
show_filters if config.loglevel == Tracer::LOG_BLACKLIST
|
31
|
-
# Special assignments from config to the Tracer
|
32
|
-
self.log_level = config.loglevel
|
33
|
-
self.environment = config.environment
|
34
|
-
self.api_key = config.proton_api_key
|
35
|
-
self.register_libraries Bundler.load.specs.map(&:full_gem_path).sort << RbConfig::CONFIG['rubylibdir']
|
21
|
+
configure(env)
|
22
|
+
initialize_blacklist
|
23
|
+
register_known_library_paths
|
24
|
+
run_agent_connectivity_diagnostics
|
36
25
|
ObjectSpace.define_finalizer(self, proc{ disable_tracepoints })
|
37
26
|
# Any fails here is kamikaze for the tracer
|
38
27
|
rescue => e
|
39
28
|
# XXX works for the middleware wrapped case, not for standalone - revisit
|
40
|
-
raise Raygun::Apm::FatalError, "Raygun APM tracer could not be initialized: #{e.message}"
|
41
|
-
end
|
42
|
-
|
43
|
-
def add_filters(filters, ignore_comments: true)
|
44
|
-
filters.each do |filter|
|
45
|
-
filter.strip!
|
46
|
-
# comment
|
47
|
-
if filter.start_with?('#')
|
48
|
-
add_blacklist filter unless ignore_comments
|
49
|
-
elsif filter.start_with?('+')
|
50
|
-
add_whitelist filter[1..-1]
|
51
|
-
elsif filter.start_with?('-')
|
52
|
-
add_blacklist filter[1..-1]
|
53
|
-
elsif filter.size > 0
|
54
|
-
add_blacklist filter
|
55
|
-
end
|
56
|
-
end
|
29
|
+
raise Raygun::Apm::FatalError, "Raygun APM tracer could not be initialized: #{e.message} #{e.backtrace.join("\n")}"
|
57
30
|
end
|
58
31
|
|
59
32
|
def udp_sink!
|
@@ -70,9 +43,39 @@ module Raygun
|
|
70
43
|
# Any fails here is kamikaze for the tracer
|
71
44
|
rescue => e
|
72
45
|
# XXX works for the middleware wrapped case, not for standalone - revisit
|
73
|
-
raise Raygun::Apm::FatalError, "Raygun APM UDP sink could not be initialized: #{e.message}"
|
46
|
+
raise Raygun::Apm::FatalError, "Raygun APM UDP sink could not be initialized: #{e.message} #{e.backtrace.join("\n")}"
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
def configure(env)
|
51
|
+
@config = Config.new(env)
|
52
|
+
# Special assignments from config to the Tracer
|
53
|
+
self.log_level = config.loglevel
|
54
|
+
self.environment = config.environment
|
55
|
+
self.api_key = config.proton_api_key
|
56
|
+
end
|
57
|
+
|
58
|
+
def initialize_blacklist
|
59
|
+
@blacklist_parser = Raygun::Apm::Blacklist::Parser.new(self)
|
60
|
+
@blacklist = if @config.proton_user_overrides_file && File.exists?(@config.proton_user_overrides_file)
|
61
|
+
File.readlines(@config.proton_user_overrides_file)
|
62
|
+
else
|
63
|
+
[]
|
64
|
+
end
|
65
|
+
# From file
|
66
|
+
@blacklist_parser.add_filters @blacklist
|
67
|
+
# Defaults
|
68
|
+
@blacklist_parser.add_filters Raygun::Apm::Blacklist.resolve_entries
|
74
69
|
end
|
75
70
|
|
71
|
+
def register_known_library_paths
|
72
|
+
self.register_libraries Bundler.load.specs.map(&:full_gem_path).sort << RbConfig::CONFIG['rubylibdir']
|
73
|
+
end
|
74
|
+
|
75
|
+
def run_agent_connectivity_diagnostics
|
76
|
+
check = Raygun::Apm::Diagnostics.new
|
77
|
+
check.verify_agent
|
78
|
+
end
|
76
79
|
end
|
77
80
|
end
|
78
81
|
end
|
data/lib/raygun/apm/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun-apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.46
|
5
5
|
platform: universal-darwin
|
6
6
|
authors:
|
7
7
|
- Raygun
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-06-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: debase-ruby_core_source
|
@@ -203,6 +203,7 @@ extra_rdoc_files: []
|
|
203
203
|
files:
|
204
204
|
- README.rdoc
|
205
205
|
- bin/console
|
206
|
+
- bin/diagnostics
|
206
207
|
- bin/setup
|
207
208
|
- ext/raygun/extconf.rb
|
208
209
|
- lib/raygun/2.5/raygun_ext.bundle
|
@@ -210,7 +211,10 @@ files:
|
|
210
211
|
- lib/raygun/2.7/raygun_ext.bundle
|
211
212
|
- lib/raygun/apm.rb
|
212
213
|
- lib/raygun/apm/blacklist.rb
|
214
|
+
- lib/raygun/apm/blacklist/parser.rb
|
215
|
+
- lib/raygun/apm/blacklist/translator.rb
|
213
216
|
- lib/raygun/apm/config.rb
|
217
|
+
- lib/raygun/apm/diagnostics.rb
|
214
218
|
- lib/raygun/apm/event.rb
|
215
219
|
- lib/raygun/apm/hooks/net_http.rb
|
216
220
|
- lib/raygun/apm/hooks/redis.rb
|