rookout 0.1.33 → 0.1.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rookout/com_ws/agent_com_ws.rb +1 -0
- data/lib/rookout/com_ws/envelope_wrapper.rb +5 -5
- data/lib/rookout/com_ws/information.rb +43 -0
- data/lib/rookout/commit.rb +1 -1
- data/lib/rookout/config.rb +3 -3
- data/lib/rookout/rookout_singleton.rb +1 -1
- data/lib/rookout/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40c3d2b4b3e7cf49a817115416ff9ac23fb2078c036744f31cbba5a187dd933f
|
4
|
+
data.tar.gz: fc57b64eb454574b754dcbfc6ea4f0fdc7579794f073f4290f4a11b336f76c10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfb0aca8f7fb82ccb39adb8c8f03f5b5242c22bb43dc23bf68f80b18d300e06e11eec8a4885edc3d8eddba58d792db254bbcb6070c030ca2d9f675557ad8a98d
|
7
|
+
data.tar.gz: fdc04d582ee9a9bc76a7b9e12ffeaa0a04be2e70a6fdfd7a3841d65ae9a088d947f97df3aaf9f65e1cdd26e0f3a4ef111ea992417eb50581dcbddc682c5716bc
|
@@ -28,17 +28,17 @@ class Variant2EnvelopeWrapper < EnvelopeWrapperBase
|
|
28
28
|
report_id: report_id
|
29
29
|
@serializer = Rookout::Processor::NamespaceSerializer2.new
|
30
30
|
@aug_report_message.arguments2 = @serializer.dump arguments
|
31
|
-
end
|
32
|
-
|
33
|
-
def envelope
|
34
|
-
return @envelope unless @envelope.nil?
|
35
31
|
@serializer.string_cache.each { |key, value| @aug_report_message.strings_cache[key] = value }
|
36
32
|
@envelope = wrap_in_envelope @aug_report_message
|
37
33
|
@aug_report_message = nil
|
38
34
|
end
|
39
35
|
|
36
|
+
def envelope
|
37
|
+
@envelope
|
38
|
+
end
|
39
|
+
|
40
40
|
def calculate_size
|
41
|
-
@envelope.length
|
41
|
+
@envelope.length
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
@@ -21,6 +21,8 @@ module Rookout
|
|
21
21
|
@labels["k8s_namespace"] = k8_namespace
|
22
22
|
end
|
23
23
|
|
24
|
+
collect_serverless_labels
|
25
|
+
|
24
26
|
@ip_addr = local_ip
|
25
27
|
|
26
28
|
@scm_info = create_scm_information
|
@@ -97,6 +99,47 @@ module Rookout
|
|
97
99
|
|
98
100
|
Com::Rookout::SCMInformation.new origin: user_git_origin, commit: user_git_commit
|
99
101
|
end
|
102
|
+
|
103
|
+
def aws_lambda?
|
104
|
+
!ENV["AWS_LAMBDA_FUNCTION_NAME"].nil?
|
105
|
+
end
|
106
|
+
|
107
|
+
def google_cloud_function?
|
108
|
+
!ENV["FUNCTION_TARGET"].nil? && !ENV["FUNCTION_SIGNATURE_TYPE"].nil?
|
109
|
+
end
|
110
|
+
|
111
|
+
def cloud_run_or_fire_base?
|
112
|
+
!ENV["K_SERVICE"].nil? &&
|
113
|
+
!ENV["K_REVISION"].nil? &&
|
114
|
+
!ENV["K_CONFIGURATION"].nil? &&
|
115
|
+
!ENV["PORT"].nil?
|
116
|
+
end
|
117
|
+
|
118
|
+
def azure_function?
|
119
|
+
!ENV["FUNCTIONS_WORKER_RUNTIME"].nil? && !ENV["WEBSITE_SITE_NAME"].nil?
|
120
|
+
end
|
121
|
+
|
122
|
+
def collect_serverless_labels
|
123
|
+
if aws_lambda?
|
124
|
+
@labels["function_name"] = ENV["AWS_LAMBDA_FUNCTION_NAME"]
|
125
|
+
@labels["aws_region"] = ENV["AWS_REGION"]
|
126
|
+
|
127
|
+
elsif google_cloud_function? || cloud_run_or_fire_base?
|
128
|
+
function_name = ENV["FUNCTION_NAME"]
|
129
|
+
if function_name.nil?
|
130
|
+
function_name = ENV["K_SERVICE"]
|
131
|
+
end
|
132
|
+
@labels["function_name"] = function_name
|
133
|
+
|
134
|
+
elsif azure_function?
|
135
|
+
@labels["function_name"] = ENV["WEBSITE_SITE_NAME"]
|
136
|
+
@labels["azure_region"] = ENV["REGION_NAME"]
|
137
|
+
end
|
138
|
+
|
139
|
+
return unless @labels.key? "function_name"
|
140
|
+
|
141
|
+
@labels["rookout_serverless"] = "true"
|
142
|
+
end
|
100
143
|
end
|
101
144
|
end
|
102
145
|
end
|
data/lib/rookout/commit.rb
CHANGED
data/lib/rookout/config.rb
CHANGED
@@ -64,10 +64,10 @@ module Rookout
|
|
64
64
|
def update_config configuration
|
65
65
|
is_config_proto2 = configuration["RUBY_PROTOBUF_VERSION_2"]
|
66
66
|
return if is_config_proto2.nil?
|
67
|
-
is_env_proto2 = ENV[
|
67
|
+
is_env_proto2 = ENV["PROTOBUF_VERSION_2"]
|
68
68
|
if is_env_proto2.nil?
|
69
|
-
@protobuf_version2 = true if @true_values.
|
70
|
-
elsif @true_values.
|
69
|
+
@protobuf_version2 = true if @true_values.include? is_config_proto2
|
70
|
+
elsif @true_values.include? is_env_proto2
|
71
71
|
@protobuf_version2 = true
|
72
72
|
end
|
73
73
|
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
|
|
data/lib/rookout/version.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.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liran Haimovitch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: binding_of_caller
|