raygun-apm 1.1.14-x86_64-linux → 1.1.15.pre2-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/COPYING.rax +9 -9
- data/LICENSE +27 -27
- data/LICENSE.bipbuffer +24 -24
- data/README.rdoc +118 -118
- data/bin/console +14 -14
- data/bin/raygun-diagnostics +6 -6
- data/bin/setup +8 -8
- data/ext/raygun/extconf.rb +59 -58
- data/lib/raygun/2.5/raygun_ext.so +0 -0
- data/lib/raygun/2.6/raygun_ext.so +0 -0
- data/lib/raygun/2.7/raygun_ext.so +0 -0
- data/lib/raygun/3.0/raygun_ext.so +0 -0
- data/lib/raygun/3.1/raygun_ext.so +0 -0
- data/lib/raygun/apm/blacklist/parser.rb +49 -49
- data/lib/raygun/apm/blacklist/translator.rb +78 -78
- data/lib/raygun/apm/blacklist.rb +476 -476
- data/lib/raygun/apm/config.rb +106 -106
- data/lib/raygun/apm/diagnostics.rb +54 -54
- data/lib/raygun/apm/event.rb +48 -48
- data/lib/raygun/apm/hooks/excon.rb +36 -36
- data/lib/raygun/apm/hooks/httpclient.rb +43 -43
- data/lib/raygun/apm/hooks/internals.rb +95 -95
- data/lib/raygun/apm/hooks/mongodb.rb +45 -45
- data/lib/raygun/apm/hooks/net_http.rb +44 -44
- data/lib/raygun/apm/hooks/redis.rb +46 -46
- data/lib/raygun/apm/tracer.rb +131 -131
- data/lib/raygun/apm/version.rb +6 -6
- data/lib/raygun/apm.rb +18 -18
- data/lib/raygun/raygun_ext.so +0 -0
- data/raygun-apm.gemspec +40 -40
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adc8e1874bea414f7dd863a95f45ebed169c8112787dacada2714f8d10ffa7ca
|
4
|
+
data.tar.gz: d39046aa2a9607fa8b8047f347d8c99074c3eeee40ed87bbcfc53cffa1ef108b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58f5d1e563d33fd91252b9c395bfc912ec48c05d1d3f1c0cb3228970e36ac770f058992a899088cb946461299af5d6eca6b1cf5b6d9eb9012d291523c2f94288
|
7
|
+
data.tar.gz: f216841be9b4a0bf3b35deb904aa7ee6bab0e6ea730d6c1724bc3697318ee4bb690001e7a9f64e49e1ede38ac5aeeb40a3778b3ab008062e3aa7e9caeb198b7d
|
data/COPYING.rax
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
Copyright (c) 2017, Salvatore Sanfilippo <antirez@gmail.com>
|
2
|
-
All rights reserved.
|
3
|
-
|
4
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
5
|
-
|
6
|
-
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
7
|
-
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
8
|
-
|
9
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1
|
+
Copyright (c) 2017, Salvatore Sanfilippo <antirez@gmail.com>
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
5
|
+
|
6
|
+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
7
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
8
|
+
|
9
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/LICENSE
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2021 Raygun Limited
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
22
|
-
|
23
|
-
This software bundles Rax, an open source project, released under the BSD two
|
24
|
-
clause license here https://github.com/antirez/rax/blob/master/COPYING
|
25
|
-
|
26
|
-
This software also bundles bipbuffer, an open source project, released under
|
27
|
-
the BSD license here https://github.com/willemt/bipbuffer/blob/master/LICENSE
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 Raygun Limited
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
23
|
+
This software bundles Rax, an open source project, released under the BSD two
|
24
|
+
clause license here https://github.com/antirez/rax/blob/master/COPYING
|
25
|
+
|
26
|
+
This software also bundles bipbuffer, an open source project, released under
|
27
|
+
the BSD license here https://github.com/willemt/bipbuffer/blob/master/LICENSE
|
data/LICENSE.bipbuffer
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
Copyright (c) 2011, Willem-Hendrik Thiart
|
2
|
-
All rights reserved.
|
3
|
-
|
4
|
-
Redistribution and use in source and binary forms, with or without
|
5
|
-
modification, are permitted provided that the following conditions are met:
|
6
|
-
* Redistributions of source code must retain the above copyright
|
7
|
-
notice, this list of conditions and the following disclaimer.
|
8
|
-
* Redistributions in binary form must reproduce the above copyright
|
9
|
-
notice, this list of conditions and the following disclaimer in the
|
10
|
-
documentation and/or other materials provided with the distribution.
|
11
|
-
* The names of its contributors may not be used to endorse or promote
|
12
|
-
products derived from this software without specific prior written
|
13
|
-
permission.
|
14
|
-
|
15
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
16
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
17
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
18
|
-
DISCLAIMED. IN NO EVENT SHALL WILLEM-HENDRIK THIART BE LIABLE FOR ANY
|
19
|
-
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
20
|
-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
21
|
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
22
|
-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
23
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
24
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1
|
+
Copyright (c) 2011, Willem-Hendrik Thiart
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
* Redistributions of source code must retain the above copyright
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
8
|
+
* Redistributions in binary form must reproduce the above copyright
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
10
|
+
documentation and/or other materials provided with the distribution.
|
11
|
+
* The names of its contributors may not be used to endorse or promote
|
12
|
+
products derived from this software without specific prior written
|
13
|
+
permission.
|
14
|
+
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
16
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
17
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL WILLEM-HENDRIK THIART BE LIABLE FOR ANY
|
19
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
20
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
21
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
22
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
23
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
24
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.rdoc
CHANGED
@@ -1,118 +1,118 @@
|
|
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
|
-
* 3.0.x
|
25
|
-
|
26
|
-
{Contact us}[https://raygun.com/about/contact] to support other Ruby versions.
|
27
|
-
|
28
|
-
== Agent Setup
|
29
|
-
|
30
|
-
The Profiler needs to be able to access the Raygun Agent over UDP.
|
31
|
-
|
32
|
-
=== Dockerized Agent
|
33
|
-
|
34
|
-
The {Dockerized Agent}[https://raygun.com/documentation/product-guides/apm/agent/installation] is supported on all Ruby profiler platforms. We recommend
|
35
|
-
this deployment model if your production infrastructure already depends on Docker.
|
36
|
-
|
37
|
-
Also a great way to explore on your Mac.
|
38
|
-
|
39
|
-
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
|
40
|
-
|
41
|
-
To launch Raygun Agent using docker
|
42
|
-
docker pull raygunowner/raygun-apm
|
43
|
-
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
|
44
|
-
|
45
|
-
=== Linux Agent
|
46
|
-
|
47
|
-
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]
|
48
|
-
|
49
|
-
=== Windows Agent
|
50
|
-
|
51
|
-
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]
|
52
|
-
|
53
|
-
== Ruby on Rails
|
54
|
-
|
55
|
-
For Rails support see {documentation}[https://www.rubydoc.info/gems/raygun-apm-rails/0.1.0] of the railgun-apm-rails gem.
|
56
|
-
|
57
|
-
== Profiler Setup
|
58
|
-
|
59
|
-
Include the gem in your Gemfile
|
60
|
-
|
61
|
-
gem 'raygun-apm'
|
62
|
-
|
63
|
-
Run <code>bundle</code> to install the gem.
|
64
|
-
|
65
|
-
Alternatively install using rubygems <code>gem install raygun-apm</code>.
|
66
|
-
|
67
|
-
=== Profiler configration
|
68
|
-
|
69
|
-
==== Multiple applications, one Agent
|
70
|
-
|
71
|
-
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.
|
72
|
-
|
73
|
-
=== Standalone ruby script / custom framework
|
74
|
-
|
75
|
-
For standalone scripts, context start-end needs to be marked specifically and optionally extended events can be called.
|
76
|
-
|
77
|
-
#!/usr/bin/env ruby
|
78
|
-
require 'raygun/apm'
|
79
|
-
|
80
|
-
class Hello
|
81
|
-
def rdoc
|
82
|
-
sleep 0.5
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
tracer = Raygun::Apm::Tracer.new
|
87
|
-
tracer.udp_sink!
|
88
|
-
tracer.start_trace
|
89
|
-
Hello.new.rdoc
|
90
|
-
tracer.end_trace
|
91
|
-
tracer.process_ended
|
92
|
-
|
93
|
-
Extended events can be sent where appropiate
|
94
|
-
|
95
|
-
<code>HTTP incoming event</code>
|
96
|
-
|
97
|
-
event = Raygun::Apm::Event::HttpIn.new
|
98
|
-
event[:pid] = Process.pid
|
99
|
-
event[:tid] = 0
|
100
|
-
event[:timestamp] = tracer.now
|
101
|
-
event[:url] = 'https://google.com/'
|
102
|
-
event[:verb] = 'GET'
|
103
|
-
event[:status] = 200
|
104
|
-
event[:duration] = 1000
|
105
|
-
tracer.emit(event)
|
106
|
-
|
107
|
-
<code>SQL query</code>
|
108
|
-
|
109
|
-
event = Raygun::Apm::Event::Sql.new
|
110
|
-
event[:pid] = Process.pid
|
111
|
-
event[:tid] = 0
|
112
|
-
event[:timestamp] = tracer.now
|
113
|
-
event[:provider] = 'postgres'
|
114
|
-
event[:host] = 'localhost'
|
115
|
-
event[:database] = 'rails'
|
116
|
-
event[:query] = 'SELECT * from FOO;'
|
117
|
-
event[:duration] = 1000
|
118
|
-
tracer.emit(event)
|
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
|
+
* 3.0.x
|
25
|
+
|
26
|
+
{Contact us}[https://raygun.com/about/contact] to support other Ruby versions.
|
27
|
+
|
28
|
+
== Agent Setup
|
29
|
+
|
30
|
+
The Profiler needs to be able to access the Raygun Agent over UDP.
|
31
|
+
|
32
|
+
=== Dockerized Agent
|
33
|
+
|
34
|
+
The {Dockerized Agent}[https://raygun.com/documentation/product-guides/apm/agent/installation] is supported on all Ruby profiler platforms. We recommend
|
35
|
+
this deployment model if your production infrastructure already depends on Docker.
|
36
|
+
|
37
|
+
Also a great way to explore on your Mac.
|
38
|
+
|
39
|
+
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
|
40
|
+
|
41
|
+
To launch Raygun Agent using docker
|
42
|
+
docker pull raygunowner/raygun-apm
|
43
|
+
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
|
44
|
+
|
45
|
+
=== Linux Agent
|
46
|
+
|
47
|
+
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]
|
48
|
+
|
49
|
+
=== Windows Agent
|
50
|
+
|
51
|
+
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]
|
52
|
+
|
53
|
+
== Ruby on Rails
|
54
|
+
|
55
|
+
For Rails support see {documentation}[https://www.rubydoc.info/gems/raygun-apm-rails/0.1.0] of the railgun-apm-rails gem.
|
56
|
+
|
57
|
+
== Profiler Setup
|
58
|
+
|
59
|
+
Include the gem in your Gemfile
|
60
|
+
|
61
|
+
gem 'raygun-apm'
|
62
|
+
|
63
|
+
Run <code>bundle</code> to install the gem.
|
64
|
+
|
65
|
+
Alternatively install using rubygems <code>gem install raygun-apm</code>.
|
66
|
+
|
67
|
+
=== Profiler configration
|
68
|
+
|
69
|
+
==== Multiple applications, one Agent
|
70
|
+
|
71
|
+
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.
|
72
|
+
|
73
|
+
=== Standalone ruby script / custom framework
|
74
|
+
|
75
|
+
For standalone scripts, context start-end needs to be marked specifically and optionally extended events can be called.
|
76
|
+
|
77
|
+
#!/usr/bin/env ruby
|
78
|
+
require 'raygun/apm'
|
79
|
+
|
80
|
+
class Hello
|
81
|
+
def rdoc
|
82
|
+
sleep 0.5
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
tracer = Raygun::Apm::Tracer.new
|
87
|
+
tracer.udp_sink!
|
88
|
+
tracer.start_trace
|
89
|
+
Hello.new.rdoc
|
90
|
+
tracer.end_trace
|
91
|
+
tracer.process_ended
|
92
|
+
|
93
|
+
Extended events can be sent where appropiate
|
94
|
+
|
95
|
+
<code>HTTP incoming event</code>
|
96
|
+
|
97
|
+
event = Raygun::Apm::Event::HttpIn.new
|
98
|
+
event[:pid] = Process.pid
|
99
|
+
event[:tid] = 0
|
100
|
+
event[:timestamp] = tracer.now
|
101
|
+
event[:url] = 'https://google.com/'
|
102
|
+
event[:verb] = 'GET'
|
103
|
+
event[:status] = 200
|
104
|
+
event[:duration] = 1000
|
105
|
+
tracer.emit(event)
|
106
|
+
|
107
|
+
<code>SQL query</code>
|
108
|
+
|
109
|
+
event = Raygun::Apm::Event::Sql.new
|
110
|
+
event[:pid] = Process.pid
|
111
|
+
event[:tid] = 0
|
112
|
+
event[:timestamp] = tracer.now
|
113
|
+
event[:provider] = 'postgres'
|
114
|
+
event[:host] = 'localhost'
|
115
|
+
event[:database] = 'rails'
|
116
|
+
event[:query] = 'SELECT * from FOO;'
|
117
|
+
event[:duration] = 1000
|
118
|
+
tracer.emit(event)
|
data/bin/console
CHANGED
@@ -1,14 +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__)
|
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__)
|
data/bin/raygun-diagnostics
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "raygun/apm"
|
5
|
-
|
6
|
-
tracer = Raygun::Apm::Tracer.new
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "raygun/apm"
|
5
|
+
|
6
|
+
tracer = Raygun::Apm::Tracer.new
|
data/bin/setup
CHANGED
@@ -1,8 +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
|
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
|
data/ext/raygun/extconf.rb
CHANGED
@@ -1,59 +1,60 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
# Makefile generator helper - from standard library
|
4
|
-
require 'mkmf'
|
5
|
-
# References core headers extracted by Ruby minor version in https://github.com/os97673/debase-ruby_core_source . Required for some of the lower level profiler features
|
6
|
-
require 'debase/ruby_core_source'
|
7
|
-
|
8
|
-
headers = proc do
|
9
|
-
have_header('ruby.h') &&
|
10
|
-
have_header('ruby/debug.h') &&
|
11
|
-
have_header("vm_core.h")
|
12
|
-
end
|
13
|
-
|
14
|
-
dir_config('raygun')
|
15
|
-
|
16
|
-
# To allow for swapping out the compiler - clang in favour of gcc for example
|
17
|
-
RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
|
18
|
-
|
19
|
-
#
|
20
|
-
append_cflags '-pedantic'
|
21
|
-
append_cflags '-Wall'
|
22
|
-
append_cflags '-Werror
|
23
|
-
append_cflags '-std=c99'
|
24
|
-
append_cflags '-
|
25
|
-
append_cflags '-
|
26
|
-
append_cflags '-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
have_func '
|
32
|
-
|
33
|
-
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
|
38
|
-
append_cflags '-
|
39
|
-
append_cflags '-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
STDERR.print("
|
58
|
-
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# Makefile generator helper - from standard library
|
4
|
+
require 'mkmf'
|
5
|
+
# References core headers extracted by Ruby minor version in https://github.com/os97673/debase-ruby_core_source . Required for some of the lower level profiler features
|
6
|
+
require 'debase/ruby_core_source'
|
7
|
+
|
8
|
+
headers = proc do
|
9
|
+
have_header('ruby.h') &&
|
10
|
+
have_header('ruby/debug.h') &&
|
11
|
+
have_header("vm_core.h")
|
12
|
+
end
|
13
|
+
|
14
|
+
dir_config('raygun')
|
15
|
+
|
16
|
+
# To allow for swapping out the compiler - clang in favour of gcc for example
|
17
|
+
RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
|
18
|
+
|
19
|
+
# Pedantic about all the things
|
20
|
+
append_cflags '-pedantic'
|
21
|
+
append_cflags '-Wall'
|
22
|
+
append_cflags '-Werror'
|
23
|
+
append_cflags '-std=c99'
|
24
|
+
append_cflags '-std=gnu99'
|
25
|
+
append_cflags '-fdeclspec'
|
26
|
+
append_cflags '-fms-extensions'
|
27
|
+
append_cflags '-ggdb3'
|
28
|
+
# Enables additional flags, stack protection and debug symbols
|
29
|
+
if ENV['DEBUG']
|
30
|
+
have_library 'ssp'
|
31
|
+
have_func '__stack_chk_guard'
|
32
|
+
have_func '__stack_chk_fail'
|
33
|
+
append_cflags '-ggdb3'
|
34
|
+
# Needed reduced -On levels for SSP to do its job.
|
35
|
+
# Used to be -O0 but switched to -Og since -O0 disables
|
36
|
+
# some optimizations that debug tools need.
|
37
|
+
# https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
|
38
|
+
append_cflags '-Og'
|
39
|
+
append_cflags '-fstack-protector-all'
|
40
|
+
append_cflags '-DRB_RG_DEBUG'
|
41
|
+
else
|
42
|
+
append_cflags '-O3'
|
43
|
+
end
|
44
|
+
|
45
|
+
# Renders an ASCII presentation of the shadow stack at runtime
|
46
|
+
if ENV['DEBUG_SHADOW_STACK']
|
47
|
+
append_cflags '-DRB_RG_DEBUG_SHADOW_STACK'
|
48
|
+
end
|
49
|
+
|
50
|
+
unless create_header
|
51
|
+
STDERR.print("extconf.h creation failed\n")
|
52
|
+
exit(1)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Check for the presence of headers in ruby_core_headers for the version currently compiled for
|
56
|
+
unless Debase::RubyCoreSource.create_makefile_with_core(headers, 'raygun_ext')
|
57
|
+
STDERR.print("Makefile creation failed\n")
|
58
|
+
STDERR.print("One or more ruby headers not found\n")
|
59
|
+
exit(1)
|
59
60
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|