rookout 0.1.28 → 0.1.50
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rookout/augs/actions/action_run_processor.rb +1 -0
- data/lib/rookout/augs/aug.rb +7 -6
- data/lib/rookout/augs/aug_factory.rb +71 -19
- data/lib/rookout/augs/aug_rate_limiter.rb +35 -36
- data/lib/rookout/augs/limits_manager.rb +32 -0
- data/lib/rookout/augs/locations/location.rb +1 -1
- data/lib/rookout/augs/locations/location_file_line.rb +5 -1
- data/lib/rookout/com_ws/agent_com_ws.rb +24 -20
- data/lib/rookout/com_ws/command_handler.rb +1 -1
- data/lib/rookout/com_ws/envelope_wrapper.rb +68 -0
- data/lib/rookout/com_ws/git.rb +1 -1
- data/lib/rookout/com_ws/information.rb +45 -1
- data/lib/rookout/com_ws/output.rb +62 -12
- data/lib/rookout/commit.rb +1 -1
- data/lib/rookout/config.rb +86 -15
- data/lib/rookout/exceptions.rb +49 -10
- data/lib/rookout/interface.rb +10 -8
- data/lib/rookout/logger.rb +13 -7
- data/lib/rookout/processor/namespace_serializer.rb +1 -1
- data/lib/rookout/processor/namespace_serializer2.rb +331 -0
- data/lib/rookout/processor/namespaces/container_namespace.rb +5 -0
- data/lib/rookout/processor/namespaces/frame_namespace.rb +2 -3
- data/lib/rookout/processor/namespaces/namespace.rb +1 -0
- data/lib/rookout/processor/namespaces/noop_namespace.rb +0 -4
- data/lib/rookout/processor/namespaces/ruby_object_namespace.rb +37 -22
- data/lib/rookout/processor/namespaces/ruby_object_serializer.rb +9 -7
- data/lib/rookout/processor/namespaces/ruby_utils_namespace.rb +0 -4
- data/lib/rookout/processor/namespaces/stack_namespace.rb +1 -0
- data/lib/rookout/processor/namespaces/traceback_namespace.rb +5 -0
- data/lib/rookout/processor/operations/set_operation.rb +2 -0
- data/lib/rookout/processor/paths/arithmetic_path.rb +4 -2
- data/lib/rookout/processor/paths/canopy/actions.rb +5 -1
- data/lib/rookout/processor/paths/canopy/consts.rb +6 -4
- data/lib/rookout/processor/paths/canopy/markers.rb +15 -5
- data/lib/rookout/processor/processor_factory.rb +0 -2
- data/lib/rookout/processor/rook_error.rb +3 -1
- data/lib/rookout/protobuf/controller_info_pb.rb +1 -0
- data/lib/rookout/protobuf/messages_pb.rb +54 -0
- data/lib/rookout/protobuf/variant2_pb.rb +42 -0
- data/lib/rookout/protobuf/variant_pb.rb +22 -0
- data/lib/rookout/rookout_singleton.rb +4 -3
- data/lib/rookout/sanitizer.rb +22 -0
- data/lib/rookout/services/position.rb +4 -3
- data/lib/rookout/services/tracer.rb +5 -2
- data/lib/rookout/utils.rb +28 -14
- data/lib/rookout/version.rb +1 -1
- data/lib/rookout.rb +4 -0
- metadata +46 -13
@@ -7,7 +7,11 @@ module Rookout
|
|
7
7
|
require_relative "../../../exceptions"
|
8
8
|
require_relative "../../namespaces/container_namespace"
|
9
9
|
|
10
|
-
|
10
|
+
# rubocop:disable Lint/EmptyClass
|
11
|
+
class Marker
|
12
|
+
# Empty base class
|
13
|
+
end
|
14
|
+
# rubocop:enable Lint/EmptyClass
|
11
15
|
|
12
16
|
class Operation < Marker
|
13
17
|
def read _namespace, _create
|
@@ -21,6 +25,7 @@ module Rookout
|
|
21
25
|
|
22
26
|
class FunctionOperation < Operation
|
23
27
|
def initialize name, args
|
28
|
+
super()
|
24
29
|
@name = name
|
25
30
|
@args = args
|
26
31
|
end
|
@@ -32,6 +37,7 @@ module Rookout
|
|
32
37
|
|
33
38
|
class AttributeOperation < Operation
|
34
39
|
def initialize name
|
40
|
+
super()
|
35
41
|
@name = name
|
36
42
|
end
|
37
43
|
|
@@ -49,6 +55,7 @@ module Rookout
|
|
49
55
|
|
50
56
|
class LookupOperation < Operation
|
51
57
|
def initialize text
|
58
|
+
super()
|
52
59
|
if (text.start_with?("'") && text.end_with?("'")) || (text.start_with?("\"") && text.end_with?("\""))
|
53
60
|
@key = text[1...-1]
|
54
61
|
else
|
@@ -63,11 +70,13 @@ module Rookout
|
|
63
70
|
|
64
71
|
class ObjectMarker < Marker
|
65
72
|
def initialize text, obj
|
73
|
+
super()
|
66
74
|
@text = text
|
67
75
|
@obj = obj
|
68
76
|
end
|
69
77
|
|
70
|
-
attr_reader :text
|
78
|
+
attr_reader :text
|
79
|
+
attr_reader :obj
|
71
80
|
|
72
81
|
def to_s
|
73
82
|
@obj.to_s
|
@@ -136,6 +145,8 @@ module Rookout
|
|
136
145
|
|
137
146
|
class Opt < Marker
|
138
147
|
def initialize opt
|
148
|
+
super()
|
149
|
+
|
139
150
|
@opt = opt
|
140
151
|
@level = nil
|
141
152
|
|
@@ -160,9 +171,8 @@ module Rookout
|
|
160
171
|
return
|
161
172
|
end
|
162
173
|
|
163
|
-
|
164
|
-
raise Exceptions::RookNonPrimitiveObjectType, first_obj.class.to_s
|
165
|
-
PRIMITIVES.include? first_obj.class
|
174
|
+
if !first_obj.nil? && !(PRIMITIVES.include? first_obj.class)
|
175
|
+
raise Exceptions::RookNonPrimitiveObjectType, first_obj.class.to_s
|
166
176
|
end
|
167
177
|
|
168
178
|
return if second_obj.nil?
|
@@ -24,7 +24,9 @@ module Rookout
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
attr_reader :message
|
27
|
+
attr_reader :message
|
28
|
+
attr_reader :exception
|
29
|
+
attr_reader :parameters
|
28
30
|
|
29
31
|
def dumps
|
30
32
|
parameters = NamespaceSerializer.dump Namespaces::RubyObjectNamespace.new(@parameters), false
|
@@ -4,6 +4,7 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require_relative 'variant_pb'
|
7
|
+
require_relative 'variant2_pb'
|
7
8
|
require_relative 'agent_info_pb'
|
8
9
|
require_relative 'controller_info_pb'
|
9
10
|
require 'google/protobuf/any_pb'
|
@@ -87,6 +88,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
87
88
|
optional :aug_id, :string, 2
|
88
89
|
optional :arguments, :message, 3, "com.rookout.Variant"
|
89
90
|
optional :report_id, :string, 4
|
91
|
+
map :strings_cache, :string, :uint32, 5
|
92
|
+
repeated :buffer_cache_buffers, :bytes, 6
|
93
|
+
repeated :buffer_cache_indexes, :uint32, 7
|
94
|
+
optional :arguments2, :message, 8, "com.rookout.Variant2"
|
95
|
+
optional :reverse_list_order, :bool, 9
|
90
96
|
end
|
91
97
|
add_message "com.rookout.UserMsg" do
|
92
98
|
optional :aug_report, :message, 1, "com.rookout.AugReportMessage"
|
@@ -98,6 +104,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
98
104
|
end
|
99
105
|
add_message "com.rookout.InitialAugsCommand" do
|
100
106
|
repeated :augs, :string, 1
|
107
|
+
map :sdk_configuration, :string, :string, 2
|
101
108
|
end
|
102
109
|
add_message "com.rookout.RemoveAugCommand" do
|
103
110
|
optional :aug_id, :string, 1
|
@@ -117,6 +124,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
117
124
|
repeated :connectedAgents, :string, 2
|
118
125
|
end
|
119
126
|
add_message "com.rookout.DataOnPremTokenRequest" do
|
127
|
+
optional :access_type, :enum, 1, "com.rookout.DataOnPremTokenAccessType"
|
120
128
|
end
|
121
129
|
add_message "com.rookout.DataOnPremTokenResponse" do
|
122
130
|
optional :token, :bytes, 1
|
@@ -150,6 +158,44 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
150
158
|
optional :message, :message, 2, "google.protobuf.Any"
|
151
159
|
optional :error, :string, 3
|
152
160
|
end
|
161
|
+
add_message "com.rookout.StartDatastoreConnectivityTestCommand" do
|
162
|
+
optional :orgId, :string, 1
|
163
|
+
optional :controllerId, :string, 2
|
164
|
+
optional :datastoreUrl, :string, 3
|
165
|
+
optional :workspaceId, :string, 4
|
166
|
+
end
|
167
|
+
add_message "com.rookout.DatastoreConnectivityTestC2cResponse" do
|
168
|
+
optional :controllerId, :string, 1
|
169
|
+
optional :TestMessageId, :string, 2
|
170
|
+
optional :isSuccess, :bool, 3
|
171
|
+
optional :errorString, :string, 4
|
172
|
+
end
|
173
|
+
add_message "com.rookout.PingDatastoreCommand" do
|
174
|
+
optional :datastoreUrl, :string, 1
|
175
|
+
end
|
176
|
+
add_message "com.rookout.DatastoreInformation" do
|
177
|
+
optional :version, :string, 1
|
178
|
+
optional :hostname, :string, 2
|
179
|
+
optional :machine_type, :string, 3
|
180
|
+
optional :network, :string, 4
|
181
|
+
optional :ip, :string, 5
|
182
|
+
optional :os, :string, 6
|
183
|
+
optional :os_release, :string, 7
|
184
|
+
optional :os_version, :string, 8
|
185
|
+
optional :os_string, :string, 9
|
186
|
+
end
|
187
|
+
add_message "com.rookout.OrgLanguagesConfigsRequest" do
|
188
|
+
end
|
189
|
+
add_message "com.rookout.LanguageConfig" do
|
190
|
+
map :config, :string, :string, 1
|
191
|
+
end
|
192
|
+
add_message "com.rookout.OrgLanguagesConfigsResponse" do
|
193
|
+
map :OrgConfig, :string, :message, 1, "com.rookout.LanguageConfig"
|
194
|
+
end
|
195
|
+
add_enum "com.rookout.DataOnPremTokenAccessType" do
|
196
|
+
value :WRITE, 0
|
197
|
+
value :READ, 1
|
198
|
+
end
|
153
199
|
end
|
154
200
|
end
|
155
201
|
|
@@ -185,5 +231,13 @@ module Com
|
|
185
231
|
HitCountUpdateMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.HitCountUpdateMessage").msgclass
|
186
232
|
C2cRpcRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.C2cRpcRequest").msgclass
|
187
233
|
C2cRpcResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.C2cRpcResponse").msgclass
|
234
|
+
StartDatastoreConnectivityTestCommand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.StartDatastoreConnectivityTestCommand").msgclass
|
235
|
+
DatastoreConnectivityTestC2cResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.DatastoreConnectivityTestC2cResponse").msgclass
|
236
|
+
PingDatastoreCommand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.PingDatastoreCommand").msgclass
|
237
|
+
DatastoreInformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.DatastoreInformation").msgclass
|
238
|
+
OrgLanguagesConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.OrgLanguagesConfigsRequest").msgclass
|
239
|
+
LanguageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.LanguageConfig").msgclass
|
240
|
+
OrgLanguagesConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.OrgLanguagesConfigsResponse").msgclass
|
241
|
+
DataOnPremTokenAccessType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.DataOnPremTokenAccessType").enummodule
|
188
242
|
end
|
189
243
|
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: variant2.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/timestamp_pb'
|
7
|
+
require_relative 'variant_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("variant2.proto", :syntax => :proto3) do
|
10
|
+
add_message "com.rookout.Error2" do
|
11
|
+
optional :message, :string, 1
|
12
|
+
optional :type, :string, 2
|
13
|
+
optional :parameters, :message, 3, "com.rookout.Variant2"
|
14
|
+
optional :exc, :message, 4, "com.rookout.Variant2"
|
15
|
+
optional :traceback, :message, 5, "com.rookout.Variant2"
|
16
|
+
end
|
17
|
+
add_message "com.rookout.Variant2" do
|
18
|
+
optional :variant_type_max_depth, :uint32, 1
|
19
|
+
optional :original_type_index_in_cache, :uint32, 2
|
20
|
+
repeated :attribute_names_in_cache, :uint32, 3
|
21
|
+
repeated :attribute_values, :message, 4, "com.rookout.Variant2"
|
22
|
+
optional :original_size, :uint32, 5
|
23
|
+
optional :long_value, :int64, 6
|
24
|
+
optional :bytes_index_in_cache, :uint32, 7
|
25
|
+
repeated :collection_keys, :message, 8, "com.rookout.Variant2"
|
26
|
+
repeated :collection_values, :message, 9, "com.rookout.Variant2"
|
27
|
+
optional :double_value, :double, 10
|
28
|
+
repeated :code_values, :message, 11, "com.rookout.Variant.CodeObject"
|
29
|
+
optional :time_value, :message, 12, "google.protobuf.Timestamp"
|
30
|
+
optional :error_value, :message, 16, "com.rookout.Error2"
|
31
|
+
optional :complex_value, :message, 17, "com.rookout.Variant.Complex"
|
32
|
+
optional :livetail, :message, 18, "com.rookout.Variant.LiveTailMessage"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
module Com
|
38
|
+
module Rookout
|
39
|
+
Error2 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.Error2").msgclass
|
40
|
+
Variant2 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.Variant2").msgclass
|
41
|
+
end
|
42
|
+
end
|
@@ -18,6 +18,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
18
18
|
optional :original_type, :string, 2
|
19
19
|
repeated :attributes, :message, 3, "com.rookout.Variant.NamedValue"
|
20
20
|
optional :max_depth, :bool, 4
|
21
|
+
optional :original_type_index_in_cache, :uint32, 5
|
21
22
|
oneof :value do
|
22
23
|
optional :int_value, :int32, 11
|
23
24
|
optional :long_value, :int64, 12
|
@@ -35,6 +36,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
35
36
|
optional :complex_value, :message, 28, "com.rookout.Variant.Complex"
|
36
37
|
optional :enum_value, :message, 31, "com.rookout.Variant.Enumeration"
|
37
38
|
optional :traceback, :message, 32, "com.rookout.Variant.Traceback"
|
39
|
+
optional :livetail, :message, 33, "com.rookout.Variant.LiveTailMessage"
|
38
40
|
end
|
39
41
|
end
|
40
42
|
add_message "com.rookout.Variant.NamedValue" do
|
@@ -48,6 +50,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
48
50
|
add_message "com.rookout.Variant.String" do
|
49
51
|
optional :original_size, :int32, 1
|
50
52
|
optional :value, :string, 2
|
53
|
+
optional :value_index_in_cache, :uint32, 3
|
51
54
|
end
|
52
55
|
add_message "com.rookout.Variant.List" do
|
53
56
|
optional :type, :string, 1
|
@@ -73,6 +76,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
73
76
|
optional :module, :string, 2
|
74
77
|
optional :filename, :string, 3
|
75
78
|
optional :lineno, :uint32, 4
|
79
|
+
optional :name_index_in_cache, :uint32, 5
|
80
|
+
optional :module_index_in_cache, :uint32, 6
|
81
|
+
optional :filename_index_in_cache, :uint32, 7
|
76
82
|
end
|
77
83
|
add_message "com.rookout.Variant.LargeInt" do
|
78
84
|
optional :value, :string, 1
|
@@ -89,6 +95,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
89
95
|
add_message "com.rookout.Variant.Traceback" do
|
90
96
|
repeated :locations, :message, 1, "com.rookout.Variant.CodeObject"
|
91
97
|
end
|
98
|
+
add_message "com.rookout.Variant.LiveTailMessage" do
|
99
|
+
optional :level_name, :string, 1
|
100
|
+
optional :msg, :string, 2
|
101
|
+
optional :formatted_message, :string, 3
|
102
|
+
optional :time, :double, 4
|
103
|
+
optional :filename, :string, 5
|
104
|
+
optional :lineno, :int32, 6
|
105
|
+
optional :function, :string, 7
|
106
|
+
optional :module, :string, 8
|
107
|
+
optional :thread_id, :int64, 9
|
108
|
+
optional :thread_name, :string, 10
|
109
|
+
map :log_context, :string, :string, 11
|
110
|
+
end
|
92
111
|
add_enum "com.rookout.Variant.Type" do
|
93
112
|
value :VARIANT_NONE, 0
|
94
113
|
value :VARIANT_INT, 1
|
@@ -113,6 +132,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
113
132
|
value :VARIANT_DYNAMIC, 20
|
114
133
|
value :VARIANT_ENUM, 21
|
115
134
|
value :VARIANT_TRACEBACK, 22
|
135
|
+
value :VARIANT_LIVETAIL, 23
|
136
|
+
value :VARIANT_SET, 24
|
116
137
|
end
|
117
138
|
end
|
118
139
|
end
|
@@ -134,6 +155,7 @@ module Com
|
|
134
155
|
Variant::Complex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.Variant.Complex").msgclass
|
135
156
|
Variant::Enumeration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.Variant.Enumeration").msgclass
|
136
157
|
Variant::Traceback = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.Variant.Traceback").msgclass
|
158
|
+
Variant::LiveTailMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.Variant.LiveTailMessage").msgclass
|
137
159
|
Variant::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.rookout.Variant.Type").enummodule
|
138
160
|
end
|
139
161
|
end
|
@@ -40,7 +40,7 @@ module Rookout
|
|
40
40
|
@services_started = false
|
41
41
|
end
|
42
42
|
|
43
|
-
def connect token: nil, host: nil, port: nil, proxy: nil, labels:
|
43
|
+
def connect token: nil, host: nil, port: nil, proxy: nil, labels: {}, async_start: false, fork: false,
|
44
44
|
throw_errors: false
|
45
45
|
raise Exceptions::RookInterfaceException, "Multiple connection attempts not supported!" unless @agent_com.nil?
|
46
46
|
|
@@ -82,9 +82,10 @@ module Rookout
|
|
82
82
|
private
|
83
83
|
|
84
84
|
def check_version_supported
|
85
|
-
raise Exceptions::
|
85
|
+
raise Exceptions::RookVersionNotSupported.new("platform", RUBY_ENGINE) unless RUBY_ENGINE == "ruby"
|
86
86
|
raise Exceptions::RookVersionNotSupported.new("version", RUBY_VERSION) unless
|
87
|
-
RUBY_VERSION.start_with?("2.7") || RUBY_VERSION.start_with?("2.6")
|
87
|
+
RUBY_VERSION.start_with?("2.7") || RUBY_VERSION.start_with?("2.6") ||
|
88
|
+
RUBY_VERSION.start_with?("3.0") || RUBY_VERSION.start_with?("3.1")
|
88
89
|
end
|
89
90
|
end
|
90
91
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require "set"
|
2
|
+
module Rookout
|
3
|
+
class Sanitizer
|
4
|
+
@@blacklisted_properties = Set["labels", "ROOKOUT_LABELS"]
|
5
|
+
|
6
|
+
def self.sanitize_object! obj
|
7
|
+
obj.each_key do |key|
|
8
|
+
if obj[key].is_a?(String) && !@@blacklisted_properties.include?(key.to_s)
|
9
|
+
obj[key] = obj[key].strip
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.sanitize_properties!
|
15
|
+
ENV.each do |key, val|
|
16
|
+
if key.start_with?("ROOKOUT_") && !@@blacklisted_properties.include?(key.to_s)
|
17
|
+
ENV[key] = val.strip
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -11,7 +11,8 @@ module Rookout
|
|
11
11
|
@method = method
|
12
12
|
end
|
13
13
|
|
14
|
-
attr_reader :lineno
|
14
|
+
attr_reader :lineno
|
15
|
+
attr_reader :method
|
15
16
|
end
|
16
17
|
|
17
18
|
class PositionResolver
|
@@ -54,7 +55,7 @@ module Rookout
|
|
54
55
|
end
|
55
56
|
|
56
57
|
def clear_augs
|
57
|
-
@augs.
|
58
|
+
@augs.each_value do |aug_id|
|
58
59
|
remove_aug aug_id
|
59
60
|
end
|
60
61
|
|
@@ -104,7 +105,7 @@ module Rookout
|
|
104
105
|
PositionMarker.new lineno, iseq
|
105
106
|
elsif suggested_match? location, filename
|
106
107
|
warning = Exceptions::RookSourceFilePathSuggestion.new location.filename, filename
|
107
|
-
location.notify_warning warning
|
108
|
+
location.notify_warning Processor::RookError.new warning
|
108
109
|
# Must return nil in order to skip this script
|
109
110
|
nil
|
110
111
|
end
|
@@ -21,12 +21,15 @@ module Rookout
|
|
21
21
|
begin
|
22
22
|
trace_point.enable target: position.method, target_line: position.lineno
|
23
23
|
rescue RuntimeError, ArgumentError => e
|
24
|
+
if e.message.include? "can not enable any hooks"
|
25
|
+
raise Exceptions::RookInvalidPositionException.new(aug.filename, position.lineno)
|
26
|
+
end
|
24
27
|
raise Exceptions::RookSetTracepointFailed.new(position.lineno, e)
|
25
28
|
end
|
26
29
|
|
27
30
|
# We add and remove a dummy trace point to re-align the tracing mechanism as a result of some bug in adding
|
28
31
|
# a breakpoint
|
29
|
-
dummy_trace_point = TracePoint.new(:line) {}
|
32
|
+
dummy_trace_point = TracePoint.new(:line) {} # Dummy
|
30
33
|
dummy_trace_point.enable target: position.method, target_line: position.lineno
|
31
34
|
dummy_trace_point.disable
|
32
35
|
|
@@ -53,7 +56,7 @@ module Rookout
|
|
53
56
|
end
|
54
57
|
|
55
58
|
def clear_augs
|
56
|
-
@augs.
|
59
|
+
@augs.each_value do |aug_id|
|
57
60
|
remove_aug aug_id
|
58
61
|
end
|
59
62
|
|
data/lib/rookout/utils.rb
CHANGED
@@ -1,20 +1,34 @@
|
|
1
|
-
module
|
2
|
-
|
1
|
+
module Rookout
|
2
|
+
module Utils
|
3
|
+
require "securerandom"
|
4
|
+
require_relative "config"
|
3
5
|
|
4
|
-
|
6
|
+
module_function
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
-
|
8
|
+
def uuid
|
9
|
+
SecureRandom.uuid.gsub(/-/, "")
|
10
|
+
end
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
def milliseconds_to_nanoseconds milliseconds
|
13
|
+
nano = milliseconds * (10**6)
|
14
|
+
nano.to_i
|
15
|
+
end
|
16
|
+
|
17
|
+
def time_to_nanoseconds time_obj
|
18
|
+
secs = time_obj.to_i
|
19
|
+
nsecs = time_obj.nsec
|
20
|
+
((10**9) * secs) + nsecs
|
21
|
+
end
|
22
|
+
|
23
|
+
def quiet_puts msg
|
24
|
+
# rubocop:disable Style/StderrPuts
|
25
|
+
return if Config.quiet
|
26
|
+
$stderr.puts msg
|
27
|
+
# rubocop:enable Style/StderrPuts
|
28
|
+
end
|
14
29
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
(10**9) * secs + nsecs
|
30
|
+
def is_number? string
|
31
|
+
true if Float(string) rescue false
|
32
|
+
end
|
19
33
|
end
|
20
34
|
end
|
data/lib/rookout/version.rb
CHANGED
data/lib/rookout.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rookout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.50
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liran Haimovitch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: binding_of_caller
|
@@ -72,70 +72,84 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 3.
|
75
|
+
version: 3.21.7
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 3.
|
82
|
+
version: 3.21.7
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: google-style
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.
|
89
|
+
version: 1.26.1
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.
|
96
|
+
version: 1.26.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: async
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.0.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.0.0
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: minitest
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
117
|
+
version: 5.16.2
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
124
|
+
version: 5.16.2
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: minitest-autotest
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - ">="
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
131
|
+
version: 1.1.1
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
138
|
+
version: 1.1.1
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: minitest-focus
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
143
|
- - ">="
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
145
|
+
version: 1.3.1
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
152
|
+
version: 1.3.1
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: minitest-rg
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,6 +192,20 @@ dependencies:
|
|
178
192
|
- - ">="
|
179
193
|
- !ruby/object:Gem::Version
|
180
194
|
version: '1.0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: hashie
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 5.0.0
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 5.0.0
|
181
209
|
description: rookout is the Ruby SDK for the Rookout Debugging Platform
|
182
210
|
email:
|
183
211
|
- support@rookout.com
|
@@ -197,12 +225,14 @@ files:
|
|
197
225
|
- lib/rookout/augs/aug_rate_limiter.rb
|
198
226
|
- lib/rookout/augs/augs_manager.rb
|
199
227
|
- lib/rookout/augs/conditions/condition.rb
|
228
|
+
- lib/rookout/augs/limits_manager.rb
|
200
229
|
- lib/rookout/augs/locations/location.rb
|
201
230
|
- lib/rookout/augs/locations/location_exception_handler.rb
|
202
231
|
- lib/rookout/augs/locations/location_file_line.rb
|
203
232
|
- lib/rookout/com_ws/agent_com_ws.rb
|
204
233
|
- lib/rookout/com_ws/backoff.rb
|
205
234
|
- lib/rookout/com_ws/command_handler.rb
|
235
|
+
- lib/rookout/com_ws/envelope_wrapper.rb
|
206
236
|
- lib/rookout/com_ws/git.rb
|
207
237
|
- lib/rookout/com_ws/information.rb
|
208
238
|
- lib/rookout/com_ws/output.rb
|
@@ -215,6 +245,7 @@ files:
|
|
215
245
|
- lib/rookout/interface.rb
|
216
246
|
- lib/rookout/logger.rb
|
217
247
|
- lib/rookout/processor/namespace_serializer.rb
|
248
|
+
- lib/rookout/processor/namespace_serializer2.rb
|
218
249
|
- lib/rookout/processor/namespaces/container_namespace.rb
|
219
250
|
- lib/rookout/processor/namespaces/frame_namespace.rb
|
220
251
|
- lib/rookout/processor/namespaces/namespace.rb
|
@@ -240,8 +271,10 @@ files:
|
|
240
271
|
- lib/rookout/protobuf/controller_info_pb.rb
|
241
272
|
- lib/rookout/protobuf/envelope_pb.rb
|
242
273
|
- lib/rookout/protobuf/messages_pb.rb
|
274
|
+
- lib/rookout/protobuf/variant2_pb.rb
|
243
275
|
- lib/rookout/protobuf/variant_pb.rb
|
244
276
|
- lib/rookout/rookout_singleton.rb
|
277
|
+
- lib/rookout/sanitizer.rb
|
245
278
|
- lib/rookout/services/position.rb
|
246
279
|
- lib/rookout/services/tracer.rb
|
247
280
|
- lib/rookout/trigger_services.rb
|
@@ -268,7 +301,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
301
|
- !ruby/object:Gem::Version
|
269
302
|
version: '0'
|
270
303
|
requirements: []
|
271
|
-
rubygems_version: 3.
|
304
|
+
rubygems_version: 3.3.26
|
272
305
|
signing_key:
|
273
306
|
specification_version: 4
|
274
307
|
summary: rookout is the Ruby SDK for the Rookout Debugging Platform
|