raygun-apm 1.1.14-x86_64-linux → 1.1.15.pre2-x86_64-linux

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.
@@ -1,95 +1,95 @@
1
- require 'thread'
2
-
3
- module Raygun
4
- module Apm
5
- module Hooks
6
- module Object
7
- def system(*args)
8
- super
9
- end
10
-
11
- def sleep(*args)
12
- super
13
- end
14
-
15
- def exec(*args)
16
- super
17
- end
18
-
19
- def spawn(*args)
20
- super
21
- end
22
-
23
- def fork(*args)
24
- super
25
- end
26
- end
27
-
28
- module IO
29
- def sycall(*args)
30
- super
31
- end
32
-
33
- def open(*args)
34
- super
35
- end
36
-
37
- def puts(*args)
38
- super
39
- end
40
-
41
- def gets(*args)
42
- super
43
- end
44
-
45
- def readline(*args)
46
- super
47
- end
48
-
49
- def readlines(*args)
50
- super
51
- end
52
- end
53
-
54
- module Random
55
- def srand(*args)
56
- super
57
- end
58
-
59
- def rand(*args)
60
- super
61
- end
62
- end
63
-
64
- module Signal
65
- def trap(*args)
66
- super
67
- end
68
- end
69
-
70
- module Mutex
71
- def synchronize(*args)
72
- super
73
- end
74
-
75
- def lock(*args)
76
- super
77
- end
78
-
79
- def unlock(*args)
80
- super
81
- end
82
-
83
- def sleep(*args)
84
- super
85
- end
86
- end
87
- end
88
- end
89
- end
90
-
91
- Raygun::Apm::Tracer.patch(Object, Raygun::Apm::Hooks::Object)
92
- Raygun::Apm::Tracer.patch(IO, Raygun::Apm::Hooks::IO)
93
- Raygun::Apm::Tracer.patch(Random, Raygun::Apm::Hooks::Random)
94
- Raygun::Apm::Tracer.patch(Signal, Raygun::Apm::Hooks::Signal)
95
- Raygun::Apm::Tracer.patch(Thread::Mutex, Raygun::Apm::Hooks::Mutex)
1
+ require 'thread'
2
+
3
+ module Raygun
4
+ module Apm
5
+ module Hooks
6
+ module Object
7
+ def system(*args)
8
+ super
9
+ end
10
+
11
+ def sleep(*args)
12
+ super
13
+ end
14
+
15
+ def exec(*args)
16
+ super
17
+ end
18
+
19
+ def spawn(*args)
20
+ super
21
+ end
22
+
23
+ def fork(*args)
24
+ super
25
+ end
26
+ end
27
+
28
+ module IO
29
+ def sycall(*args)
30
+ super
31
+ end
32
+
33
+ def open(*args)
34
+ super
35
+ end
36
+
37
+ def puts(*args)
38
+ super
39
+ end
40
+
41
+ def gets(*args)
42
+ super
43
+ end
44
+
45
+ def readline(*args)
46
+ super
47
+ end
48
+
49
+ def readlines(*args)
50
+ super
51
+ end
52
+ end
53
+
54
+ module Random
55
+ def srand(*args)
56
+ super
57
+ end
58
+
59
+ def rand(*args)
60
+ super
61
+ end
62
+ end
63
+
64
+ module Signal
65
+ def trap(*args)
66
+ super
67
+ end
68
+ end
69
+
70
+ module Mutex
71
+ def synchronize(*args)
72
+ super
73
+ end
74
+
75
+ def lock(*args)
76
+ super
77
+ end
78
+
79
+ def unlock(*args)
80
+ super
81
+ end
82
+
83
+ def sleep(*args)
84
+ super
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end
90
+
91
+ Raygun::Apm::Tracer.patch(Object, Raygun::Apm::Hooks::Object)
92
+ Raygun::Apm::Tracer.patch(IO, Raygun::Apm::Hooks::IO)
93
+ Raygun::Apm::Tracer.patch(Random, Raygun::Apm::Hooks::Random)
94
+ Raygun::Apm::Tracer.patch(Signal, Raygun::Apm::Hooks::Signal)
95
+ Raygun::Apm::Tracer.patch(Thread::Mutex, Raygun::Apm::Hooks::Mutex)
@@ -1,45 +1,45 @@
1
- require 'mongo'
2
-
3
- module Raygun
4
- module Apm
5
- module Hooks
6
- module MongoDB
7
- def do_execute(connection, client, options = {})
8
- result = nil
9
- if tracer = Raygun::Apm::Tracer.instance
10
- started = tracer.now
11
- result = super
12
- ended = tracer.now
13
- event = raygun_apm_sql_event
14
- event[:pid] = Process.pid
15
- event[:query] = raygun_format_query(connection)
16
- event[:provider] = "mongodb"
17
- event[:host] = connection.address.to_s
18
- event[:database] = client.database.name
19
- event[:duration] = ended - started
20
- event[:timestamp] = started
21
- event[:tid] = tracer.get_thread_id(Thread.current)
22
- tracer.emit(event)
23
- result
24
- else
25
- super
26
- end
27
- end
28
-
29
- private
30
- def raygun_format_query(connection)
31
- payload = message(connection).payload
32
- return "#{payload["database_name"]}.#{payload["command_name"]} #{payload["command"]}}"
33
- end
34
-
35
- def raygun_apm_sql_event
36
- @_raygun_apm_sql_event ||= Raygun::Apm::Event::Sql.new
37
- end
38
- end
39
- end
40
- end
41
- end
42
-
43
- Mongo::Operation.constants.each do |operation|
44
- Raygun::Apm::Tracer.patch(Mongo::Operation.const_get(operation), Raygun::Apm::Hooks::MongoDB) rescue nil
45
- end
1
+ require 'mongo'
2
+
3
+ module Raygun
4
+ module Apm
5
+ module Hooks
6
+ module MongoDB
7
+ def do_execute(connection, client, options = {})
8
+ result = nil
9
+ if tracer = Raygun::Apm::Tracer.instance
10
+ started = tracer.now
11
+ result = super
12
+ ended = tracer.now
13
+ event = raygun_apm_sql_event
14
+ event[:pid] = Process.pid
15
+ event[:query] = raygun_format_query(connection)
16
+ event[:provider] = "mongodb"
17
+ event[:host] = connection.address.to_s
18
+ event[:database] = client.database.name
19
+ event[:duration] = ended - started
20
+ event[:timestamp] = started
21
+ event[:tid] = tracer.get_thread_id(Thread.current)
22
+ tracer.emit(event)
23
+ result
24
+ else
25
+ super
26
+ end
27
+ end
28
+
29
+ private
30
+ def raygun_format_query(connection)
31
+ payload = message(connection).payload
32
+ return "#{payload["database_name"]}.#{payload["command_name"]} #{payload["command"]}}"
33
+ end
34
+
35
+ def raygun_apm_sql_event
36
+ @_raygun_apm_sql_event ||= Raygun::Apm::Event::Sql.new
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ Mongo::Operation.constants.each do |operation|
44
+ Raygun::Apm::Tracer.patch(Mongo::Operation.const_get(operation), Raygun::Apm::Hooks::MongoDB) rescue nil
45
+ end
@@ -1,44 +1,44 @@
1
- require 'net/http'
2
-
3
- module Raygun
4
- module Apm
5
- module Hooks
6
- module Net
7
- module HTTP
8
- private
9
-
10
- def transport_request(request)
11
- if tracer = Raygun::Apm::Tracer.instance
12
- started = tracer.now
13
- response = super
14
- ended = tracer.now
15
- event = raygun_apm_http_out_event
16
- event[:pid] = Process.pid
17
- event[:url] = raygun_apm_url(request)
18
- event[:verb] = request.method
19
- event[:status] = response.code.to_i
20
- event[:duration] = ended - started
21
- event[:timestamp] = started
22
- event[:tid] = tracer.get_thread_id(Thread.current)
23
- tracer.emit(event)
24
- response
25
- else
26
- super
27
- end
28
- end
29
-
30
- def raygun_apm_url(request)
31
- return request.uri.to_s if request.uri
32
- "#{use_ssl? ? "https" : "http"}://#{request["host"] || address}#{request.path}"
33
- end
34
-
35
- def raygun_apm_http_out_event
36
- @_raygun_apm_http_out_event ||= Raygun::Apm::Event::HttpOut.new
37
- end
38
- end
39
- end
40
- end
41
- end
42
- end
43
-
44
- Raygun::Apm::Tracer.patch(::Net::HTTP, Raygun::Apm::Hooks::Net::HTTP)
1
+ require 'net/http'
2
+
3
+ module Raygun
4
+ module Apm
5
+ module Hooks
6
+ module Net
7
+ module HTTP
8
+ private
9
+
10
+ def transport_request(request)
11
+ if tracer = Raygun::Apm::Tracer.instance
12
+ started = tracer.now
13
+ response = super
14
+ ended = tracer.now
15
+ event = raygun_apm_http_out_event
16
+ event[:pid] = Process.pid
17
+ event[:url] = raygun_apm_url(request)
18
+ event[:verb] = request.method
19
+ event[:status] = response.code.to_i
20
+ event[:duration] = ended - started
21
+ event[:timestamp] = started
22
+ event[:tid] = tracer.get_thread_id(Thread.current)
23
+ tracer.emit(event)
24
+ response
25
+ else
26
+ super
27
+ end
28
+ end
29
+
30
+ def raygun_apm_url(request)
31
+ return request.uri.to_s if request.uri
32
+ "#{use_ssl? ? "https" : "http"}://#{request["host"] || address}#{request.path}"
33
+ end
34
+
35
+ def raygun_apm_http_out_event
36
+ @_raygun_apm_http_out_event ||= Raygun::Apm::Event::HttpOut.new
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+
44
+ Raygun::Apm::Tracer.patch(::Net::HTTP, Raygun::Apm::Hooks::Net::HTTP)
@@ -1,46 +1,46 @@
1
- module Raygun
2
- module Apm
3
- module Hooks
4
- module Redis
5
- def process(commands)
6
- result = nil
7
- if tracer = Raygun::Apm::Tracer.instance
8
- started = tracer.now
9
- result = super
10
- ended = tracer.now
11
- event = raygun_apm_sql_event
12
- event[:pid] = Process.pid
13
- event[:query] = raygun_format_query(commands)
14
- event[:provider] = "redis"
15
- event[:host] = "#{host}:#{port}"
16
- event[:database] = db.to_s
17
- event[:duration] = ended - started
18
- event[:timestamp] = started
19
- event[:tid] = tracer.get_thread_id(Thread.current)
20
- tracer.emit(event)
21
- result
22
- else
23
- super
24
- end
25
- end
26
-
27
- private
28
- def raygun_format_query(commands)
29
- commands.map do |command|
30
- command.map(&:to_s).join(" ")
31
- end.join(", ")
32
- end
33
-
34
- def raygun_apm_sql_event
35
- @_raygun_apm_sql_event ||= Raygun::Apm::Event::Sql.new
36
- end
37
-
38
- def raygun_redis_call
39
- yield
40
- end
41
- end
42
- end
43
- end
44
- end
45
-
46
- Raygun::Apm::Tracer.patch(::Redis::Client, Raygun::Apm::Hooks::Redis)
1
+ module Raygun
2
+ module Apm
3
+ module Hooks
4
+ module Redis
5
+ def process(commands)
6
+ result = nil
7
+ if tracer = Raygun::Apm::Tracer.instance
8
+ started = tracer.now
9
+ result = super
10
+ ended = tracer.now
11
+ event = raygun_apm_sql_event
12
+ event[:pid] = Process.pid
13
+ event[:query] = raygun_format_query(commands)
14
+ event[:provider] = "redis"
15
+ event[:host] = "#{host}:#{port}"
16
+ event[:database] = db.to_s
17
+ event[:duration] = ended - started
18
+ event[:timestamp] = started
19
+ event[:tid] = tracer.get_thread_id(Thread.current)
20
+ tracer.emit(event)
21
+ result
22
+ else
23
+ super
24
+ end
25
+ end
26
+
27
+ private
28
+ def raygun_format_query(commands)
29
+ commands.map do |command|
30
+ command.map(&:to_s).join(" ")
31
+ end.join(", ")
32
+ end
33
+
34
+ def raygun_apm_sql_event
35
+ @_raygun_apm_sql_event ||= Raygun::Apm::Event::Sql.new
36
+ end
37
+
38
+ def raygun_redis_call
39
+ yield
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+
46
+ Raygun::Apm::Tracer.patch(::Redis::Client, Raygun::Apm::Hooks::Redis)