alexb-raygun-apm 1.0.57-x86-linux

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 67845b419cdb481922a7433023442d72f9047fea9dd9b7c1b5dc2d8cd4bfdb8b
4
+ data.tar.gz: b82bf0ef643adb5407931697d7f99fb2c5bb55ac4ef21a59b974ddbe0b786f69
5
+ SHA512:
6
+ metadata.gz: d885387a1067c6e990c2269c1a7701b1299f08b01682e5b2a4acc650063c3cf9ba52c0768432a47cd4f3d1f76607bda5ea8fa213d0d14997d7754fd08feb1359
7
+ data.tar.gz: 3bf8a4a030aeb8c91f24a81994470ea4ff3a18b5ebf2d1a49cab812762cbd981b48a7e65a44a791e082c5b9f760f2940707085a502774f64711432a41bdf2500
@@ -0,0 +1,117 @@
1
+ = Raygun Application Performance Monitoring
2
+
3
+ Ruby Profiler for {Raygun Application Performance Monitoring}[https://raygun.com/documentation/language-guides/ruby/apm/installation/].
4
+
5
+ Distributed as a precompiled native gem.
6
+
7
+ == Supported platforms
8
+
9
+ * x86-mingw32
10
+ * x64-mingw32
11
+ * x86-linux
12
+ * x86_64-linux
13
+ * universal-darwin
14
+
15
+ {Contact us}[https://raygun.com/about/contact] to support other platforms.
16
+
17
+ == Supported Ruby versions
18
+
19
+ The profiler only supports CRuby, also known as Matz's Ruby Interpreter (MRI).
20
+
21
+ * 2.5.x
22
+ * 2.6.x
23
+ * 2.7.x
24
+
25
+ {Contact us}[https://raygun.com/about/contact] to support other Ruby versions.
26
+
27
+ == Agent Setup
28
+
29
+ The Profiler needs to be able to access the Raygun Agent over UDP.
30
+
31
+ === Dockerized Agent
32
+
33
+ The {Dockerized Agent}[https://raygun.com/documentation/product-guides/apm/agent/installation] is supported on all Ruby profiler platforms. We recommend
34
+ this deployment model if your production infrastructure already depends on Docker.
35
+
36
+ Also a great way to explore on your Mac.
37
+
38
+ The <code>RAYGUN_AGENT_TOKEN</code> needs to be supplied as an argument and is available under "Application Settings" within the {Raygun Application Performance Monitoring}[https://raygun.com/platform/apm] UI
39
+
40
+ To launch Raygun Agent using docker
41
+ docker pull raygunowner/raygun-apm
42
+ docker run -v raygun-agent:/usr/share/Raygun -e "RAYGUN_AGENT_TOKEN=<token>" -p 2790:2790 -p 2788:2788 -p 2799:2799/udp -it raygunowner/raygun-apm:latest
43
+
44
+ === Linux Agent
45
+
46
+ The Linux version can be installed either using {systemd}[https://raygun.com/documentation/product-guides/apm/agent/installation/#installing-on-linux-using-systemd] or via {terminal}[https://raygun.com/documentation/product-guides/apm/agent/installation/#installing-on-linux-using-terminal]
47
+
48
+ === Windows Agent
49
+
50
+ On windows the agent can be installed either via {MSI installer}[https://raygun.com/documentation/product-guides/apm/agent/installation/#installing-on-linux-using-terminal] or on {.NET core}[https://raygun.com/documentation/product-guides/apm/agent/installation/#installing-on-windows-net-core]
51
+
52
+ == Ruby on Rails
53
+
54
+ For Rails support see {documentation}[https://www.rubydoc.info/gems/raygun-apm-rails/0.1.0] of the railgun-apm-rails gem.
55
+
56
+ == Profiler Setup
57
+
58
+ Include the gem in your Gemfile
59
+
60
+ gem 'raygun-apm'
61
+
62
+ Run <code>bundle</code> to install the gem.
63
+
64
+ Alternatively install using rubygems <code>gem install raygun-apm</code>.
65
+
66
+ === Profiler configration
67
+
68
+ ==== Multiple applications, one Agent
69
+
70
+ Set the `PROTON_API_KEY` environment variable to your API key, which is available under "Application Settings" within the {Raygun Application Performance Monitoring}[https://raygun.com/platform/apm] UI.
71
+
72
+ === Standalone ruby script / custom framework
73
+
74
+ For standalone scripts, context start-end needs to be marked specifically and optionally extended events can be called.
75
+
76
+ #!/usr/bin/env ruby
77
+ require 'raygun/apm'
78
+
79
+ class Hello
80
+ def rdoc
81
+ sleep 0.5
82
+ end
83
+ end
84
+
85
+ tracer = Raygun::Apm::Tracer.new
86
+ tracer.udp_sink!
87
+ tracer.start_trace
88
+ Hello.new.rdoc
89
+ tracer.end_trace
90
+ tracer.process_ended
91
+
92
+ Extended events can be sent where appropiate
93
+
94
+ <code>HTTP incoming event</code>
95
+
96
+ event = Raygun::Apm::Event::HttpIn.new
97
+ event[:pid] = Process.pid
98
+ event[:tid] = 0
99
+ event[:timestamp] = tracer.now
100
+ event[:url] = 'https://google.com/'
101
+ event[:verb] = 'GET'
102
+ event[:status] = 200
103
+ event[:duration] = 1000
104
+ tracer.emit(event)
105
+
106
+ <code>SQL query</code>
107
+
108
+ event = Raygun::Apm::Event::Sql.new
109
+ event[:pid] = Process.pid
110
+ event[:tid] = 0
111
+ event[:timestamp] = tracer.now
112
+ event[:provider] = 'postgres'
113
+ event[:host] = 'localhost'
114
+ event[:database] = 'rails'
115
+ event[:query] = 'SELECT * from FOO;'
116
+ event[:duration] = 1000
117
+ tracer.emit(event)
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "raygun/apm"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "raygun/apm"
5
+
6
+ check = Raygun::Apm::Diagnostics.new
7
+ check.verify_agent
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,49 @@
1
+ # encoding: utf-8
2
+
3
+ require 'mkmf'
4
+ require 'debase/ruby_core_source'
5
+
6
+ headers = proc do
7
+ have_header('ruby.h') &&
8
+ have_header('ruby/debug.h') &&
9
+ have_header("vm_core.h")
10
+ end
11
+
12
+ dir_config('raygun')
13
+
14
+ RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
15
+
16
+ append_cflags '-pedantic'
17
+ append_cflags '-Wall'
18
+ append_cflags '-Werror=switch'
19
+ append_cflags '-std=c99'
20
+ if ENV['DEBUG']
21
+ have_library 'ssp'
22
+ have_func '__stack_chk_guard'
23
+ have_func '__stack_chk_fail'
24
+ append_cflags '-ggdb3'
25
+ # Needed reduced -On levels for SSP to do its job.
26
+ # Used to be -O0 but switched to -Og since -O0 disables
27
+ # some optimizations that debug tools need.
28
+ # https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
29
+ append_cflags '-Og'
30
+ append_cflags '-fstack-protector-all'
31
+ append_cflags '-DRB_RG_DEBUG'
32
+ else
33
+ append_cflags '-O3'
34
+ end
35
+
36
+ if ENV['DEBUG_SHADOW_STACK']
37
+ append_cflags '-DRB_RG_DEBUG_SHADOW_STACK'
38
+ end
39
+
40
+ unless create_header
41
+ STDERR.print("extconf.h creation failed\n")
42
+ exit(1)
43
+ end
44
+
45
+ unless Debase::RubyCoreSource.create_makefile_with_core(headers, 'raygun_ext')
46
+ STDERR.print("Makefile creation failed\n")
47
+ STDERR.print("One or more ruby headers not found\n")
48
+ exit(1)
49
+ end
@@ -0,0 +1,25 @@
1
+ require "raygun/apm/version"
2
+
3
+ begin
4
+ # Attempt to load a precompiled shared object (released gem)
5
+ RUBY_VERSION =~ /(\d+\.\d+)/
6
+ require "raygun/#{$1}/raygun_ext"
7
+ rescue LoadError
8
+ # Attempt to load the development specific extension (non-released gem, local dev)
9
+ require "raygun/raygun_ext"
10
+ end
11
+
12
+ require "raygun/apm/config"
13
+ require "raygun/apm/diagnostics"
14
+ require "raygun/apm/blacklist/parser"
15
+ require "raygun/apm/blacklist/translator"
16
+ require "raygun/apm/tracer"
17
+ require "raygun/apm/event"
18
+ require "raygun/apm/hooks/internals"
19
+ require "raygun/apm/hooks/net_http"
20
+ # conditionally required - may not be bundled
21
+ begin
22
+ require "raygun/apm/hooks/httpclient"
23
+ require "raygun/apm/hooks/excon"
24
+ rescue LoadError
25
+ end
@@ -0,0 +1,460 @@
1
+ module Raygun
2
+ module Apm
3
+ module Blacklist
4
+ PROFILER = %w{
5
+ Raygun
6
+ Raygun::Apm::
7
+ }
8
+
9
+ # From https://ruby-doc.org/core-2.6.3/ , to automate
10
+ DEFAULT_RUBY = %w{
11
+ #<refinement:
12
+ #<Module:
13
+ #<Class:
14
+ #<#<Class:
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#
125
+ Net::
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
+ PP::
144
+ PrettyPrint#
145
+ PrettyPrint::
146
+ Minitest
147
+ Psych
148
+ Mutex_m#
149
+ ERB#
150
+ ERB::
151
+ Gem#
152
+ Gem::
153
+ FileUtils#
154
+ FileUtils::
155
+ TempFile#
156
+ TempFile::
157
+ }
158
+
159
+ INTERNALS = %w{
160
+ +Object#sleep
161
+ +Object#exec
162
+ +Object#fork
163
+ +Object#system
164
+ +Object#spawn
165
+ +Continuation#callcc
166
+ +IO#syscall
167
+ +IO#open
168
+ +IO#puts
169
+ +IO#gets
170
+ +IO#readline
171
+ +IO#readlines
172
+ +Random#srand
173
+ +Random#rand
174
+ +Signal#trap
175
+ }
176
+
177
+ HTTP_OUT = %w{
178
+ #Faraday
179
+ URI
180
+ MonitorMixin
181
+ Faraday
182
+ +Faraday::Connection#get
183
+ +Faraday::Connection#head
184
+ +Faraday::Connection#delete
185
+ +Faraday::Connection#trace
186
+ +Faraday::Connection#post
187
+ +Faraday::Connection#put
188
+ +Faraday::Connection#patch
189
+ #multipart-post
190
+ Multipartable
191
+ SecureRandom
192
+ Parts
193
+ CompositeReadIO
194
+ +Multipartable#initialize
195
+ #rest-client
196
+ RestClient
197
+ Netrc
198
+ HTTP::CookieJar
199
+ DomainName
200
+ HTTP::Accept
201
+ +RestClient.get
202
+ +RestClient.head
203
+ +RestClient.delete
204
+ +RestClient.trace
205
+ +RestClient.post
206
+ +RestClient.put
207
+ +RestClient.patch
208
+ #excon
209
+ Excon
210
+ +Excon.get
211
+ +Excon.head
212
+ +Excon.delete
213
+ +Excon.trace
214
+ +Excon.post
215
+ +Excon.put
216
+ +Excon.patch
217
+ #HTTParty
218
+ HTTParty
219
+ +HTTParty.get
220
+ +HTTParty.head
221
+ +HTTParty.delete
222
+ +HTTParty.trace
223
+ +HTTParty.post
224
+ +HTTParty.put
225
+ +HTTParty.patch
226
+ #httpclient
227
+ HTTPClient
228
+ HTTP::Message
229
+ +HTTPClient#get
230
+ +HTTPClient#head
231
+ +HTTPClient#delete
232
+ +HTTPClient#trace
233
+ +HTTPClient#post
234
+ +HTTPClient#put
235
+ +HTTPClient#patch
236
+ #net-http
237
+ +Net::HTTP.get_response
238
+ +Net::HTTP.get
239
+ +Net::HTTP.head
240
+ +Net::HTTP.delete
241
+ +Net::HTTP.trace
242
+ +Net::HTTP.post
243
+ +Net::HTTP.put
244
+ +Net::HTTP.patch
245
+ +Net::HTTP.post_form
246
+ }
247
+
248
+ QUERIES = %w{
249
+ #redis
250
+ Redis
251
+ +Redis#auth
252
+ +Redis#select
253
+ +Redis#ping
254
+ +Redis#echo
255
+ +Redis#bgrewriteaof
256
+ +Redis#bgsave
257
+ +Redis#config
258
+ +Redis#dbsize
259
+ +Redis#debug
260
+ +Redis#flushall
261
+ +Redis#flushdb
262
+ +Redis#info
263
+ +Redis#lastsave
264
+ +Redis#monitor
265
+ +Redis#save
266
+ +Redis#shutdown
267
+ +Redis#slave
268
+ +Redis#slowlog
269
+ +Redis#sync
270
+ +Redis#time
271
+ +Redis#persist
272
+ +Redis#expire
273
+ +Redis#expireat
274
+ +Redis#ttl
275
+ +Redis#pexpire
276
+ +Redis#pexpireat
277
+ +Redis#pttl
278
+ +Redis#dump
279
+ +Redis#restore
280
+ +Redis#migrate
281
+ +Redis#del
282
+ +Redis#unlink
283
+ +Redis#exists
284
+ +Redis#keys
285
+ +Redis#move
286
+ +Redis#object
287
+ +Redis#randomkey
288
+ +Redis#rename
289
+ +Redis#renamenx
290
+ +Redis#sort
291
+ +Redis#type
292
+ +Redis#decr
293
+ +Redis#decrby
294
+ +Redis#incr
295
+ +Redis#incrby
296
+ +Redis#incrbyfloat
297
+ +Redis#set
298
+ +Redis#multi
299
+ +Redis#client
300
+ +Redis#set
301
+ +Redis#setex
302
+ +Redis#psetex
303
+ +Redis#setnx
304
+ +Redis#mset
305
+ +Redis#mapped_mset
306
+ +Redis#msetnx
307
+ +Redis#mapped_msetnx
308
+ +Redis#get
309
+ +Redis#mget
310
+ +Redis#mapped_mget
311
+ +Redis#setrange
312
+ +Redis#getrange
313
+ +Redis#setbit
314
+ +Redis#getbit
315
+ +Redis#append
316
+ +Redis#bitcount
317
+ +Redis#bitop
318
+ +Redis#bitpos
319
+ +Redis#getset
320
+ +Redis#strlen
321
+ +Redis#llen
322
+ +Redis#lpush
323
+ +Redis#lpushx
324
+ +Redis#rpush
325
+ +Redis#rpushx
326
+ +Redis#lpop
327
+ +Redis#rpop
328
+ +Redis#rpoplpush
329
+ +Redis#blpop
330
+ +Redis#brpop
331
+ +Redis#brpoplpush
332
+ +Redis#lindex
333
+ +Redis#linsert
334
+ +Redis#lrange
335
+ +Redis#lrem
336
+ +Redis#lset
337
+ +Redis#ltrim
338
+ +Redis#scard
339
+ +Redis#sadd
340
+ +Redis#srem
341
+ +Redis#spop
342
+ +Redis#srandmember
343
+ +Redis#smove
344
+ +Redis#sismember
345
+ +Redis#smembers
346
+ +Redis#sdiff
347
+ +Redis#sdiffstore
348
+ +Redis#sinter
349
+ +Redis#sinterstore
350
+ +Redis#sunion
351
+ +Redis#sunionstore
352
+ +Redis#zcard
353
+ +Redis#zadd
354
+ +Redis#zincrby
355
+ +Redis#zrem
356
+ +Redis#zpopmax
357
+ +Redis#zpopmin
358
+ +Redis#bzpopmax
359
+ +Redis#bzpopmin
360
+ +Redis#zscore
361
+ +Redis#zrange
362
+ +Redis#zrevrange
363
+ +Redis#zrank
364
+ +Redis#zrevrank
365
+ +Redis#zremrangebyrank
366
+ +Redis#zlexcount
367
+ +Redis#zrangebylex
368
+ +Redis#zrevrangebylex
369
+ +Redis#zrangebyscore
370
+ +Redis#zrevrangebyscore
371
+ +Redis#zremrangebyscore
372
+ +Redis#zcount
373
+ +Redis#zinterstore
374
+ +Redis#zunionstore
375
+ +Redis#hlen
376
+ +Redis#hset
377
+ +Redis#hsetnx
378
+ +Redis#hmset
379
+ +Redis#mapped_hmset
380
+ +Redis#hget
381
+ +Redis#hmget
382
+ +Redis#mapped_hmget
383
+ +Redis#hdel
384
+ +Redis#hexists
385
+ +Redis#hincrby
386
+ +Redis#hincrbyfloat
387
+ +Redis#hkeys
388
+ +Redis#hvals
389
+ +Redis#hgetall
390
+ +Redis#publish
391
+ +Redis#subscribe
392
+ +Redis#subscribe_with_timeout
393
+ +Redis#unsubscribe
394
+ +Redis#psubscribe
395
+ +Redis#psubscribe_with_timeout
396
+ +Redis#punsubscribe
397
+ +Redis#pubsub
398
+ +Redis#watch
399
+ +Redis#unwatch
400
+ +Redis#pipelined
401
+ +Redis#multi
402
+ +Redis#exec
403
+ +Redis#discard
404
+ +Redis#script
405
+ +Redis#eval
406
+ +Redis#evalsha
407
+ +Redis#scan
408
+ +Redis#hscan
409
+ +Redis#zscan
410
+ +Redis#sscan
411
+ +Redis#pfadd
412
+ +Redis#pfcount
413
+ +Redis#pfmerge
414
+ +Redis#geoadd
415
+ +Redis#geohash
416
+ +Redis#georadiusbymember
417
+ +Redis#geopos
418
+ +Redis#geodist
419
+ +Redis#xinfo
420
+ +Redis#xadd
421
+ +Redis#xtrim
422
+ +Redis#xdel
423
+ +Redis#xrange
424
+ +Redis#xrevrange
425
+ +Redis#xlen
426
+ +Redis#xread
427
+ +Redis#xgroup
428
+ +Redis#xreadgroup
429
+ +Redis#xack
430
+ +Redis#xclaim
431
+ +Redis#xpending
432
+ +Redis#sentinel
433
+ +Redis#cluster
434
+ +Redis#asking
435
+ }
436
+
437
+ RAYGUN4RUBY = %w{
438
+ Raygun::Breadcrumbs
439
+ Raygun::Configuration
440
+ Raygun.config
441
+ Raygun.log
442
+ Raygun.should_report?
443
+ Raygun::Client
444
+ +Raygun.track_exception
445
+ }
446
+
447
+ def self.extend_with(list)
448
+ self.extended_blacklist << list
449
+ end
450
+
451
+ def self.extended_blacklist
452
+ @@extended_blacklist ||= []
453
+ end
454
+
455
+ def self.resolve_entries
456
+ DEFAULT_RUBY + PROFILER + INTERNALS + HTTP_OUT + QUERIES + RAYGUN4RUBY + self.extended_blacklist.flatten
457
+ end
458
+ end
459
+ end
460
+ end