@@ -32,10 +32,6 @@ pub struct AppConfig {
3232 pub sample_rate : Option < u32 > ,
3333 pub server_address : Option < String > ,
3434 pub tag : Option < String > ,
35- // TODO: placeholder for future implementation
36- //pub upstream_request_timeout: Option<String>,
37- //pub upstream_threads: Option<u32>,
38- //pub auth_token: Option<String>,
3935 pub user_name : Option < u32 > ,
4036 pub group_name : Option < u32 > ,
4137 pub command : Option < String > ,
@@ -80,15 +76,9 @@ impl AppConfig {
8076 }
8177 }
8278 if sub_connect. is_present ( "no_logging" ) {
83- //if let Some(no_logging) = sub_connect.value_of("no_logging") {
84- //AppConfig::set("no_logging", no_logging)?;
85- //}
8679 AppConfig :: set ( "no_logging" , "true" ) ?;
8780 }
8881 if sub_connect. is_present ( "pyspy_blocking" ) {
89- //if let Some(pyspy_blocking) = sub_connect.value_of("pyspy_blocking") {
90- //AppConfig::set("pyspy_blocking", pyspy_blocking)?;
91- //}
9282 AppConfig :: set ( "pyspy_blocking" , "true" ) ?;
9383 }
9484 if sub_connect. is_present ( "pyspy_idle" ) {
@@ -101,9 +91,6 @@ impl AppConfig {
10191 AppConfig :: set ( "pyspy_native" , "true" ) ?;
10292 }
10393 if sub_connect. is_present ( "rbspy_blocking" ) {
104- //if let Some(rbspy_blocking) = sub_connect.value_of("rbspy_blocking") {
105- //AppConfig::set("rbspy_blocking", rbspy_blocking)?;
106- //}
10794 AppConfig :: set ( "rbspy_blocking" , "true" ) ?;
10895 }
10996 if sub_connect. is_present ( "sample_rate" ) {
@@ -124,34 +111,12 @@ impl AppConfig {
124111 AppConfig :: set ( "tag" , tag. as_str ( ) ) ?;
125112 }
126113 }
127- // TODO: placeholder for future implementation
128- //if sub_connect.is_present("upstream_request_timeout") {
129- //if let Some(upstream_request_timeout) =
130- //sub_connect.value_of("upstream_request_timeout")
131- //{
132- //AppConfig::set("upstream_request_timeout", upstream_request_timeout)?;
133- //}
134- //}
135- //if sub_connect.is_present("upstream_threads") {
136- //if let Some(upstream_threads) = sub_connect.value_of("upstream_threads") {
137- //AppConfig::set("upstream_threads", upstream_threads)?;
138- //}
139- //}
140114 if sub_connect. is_present ( "application_name" ) {
141115 if let Some ( application_name) = sub_connect. value_of ( "application_name" ) {
142116 AppConfig :: set ( "application_name" , application_name) ?;
143117 }
144118 }
145- // TODO: placeholder for future implementation
146- //if sub_connect.is_present("auth_token") {
147- //if let Some(auth_token) = sub_connect.value_of("auth_token") {
148- //AppConfig::set("auth_token", auth_token)?;
149- //}
150- //}
151119 if sub_connect. is_present ( "detect_subprocesses" ) {
152- //if let Some(detect_subprocesses) = sub_connect.value_of("detect_subprocesses") {
153- //AppConfig::set("detect_subprocesses", detect_subprocesses)?;
154- //}
155120 AppConfig :: set ( "detect_subprocesses" , "true" ) ?;
156121 }
157122 if sub_connect. is_present ( "pid" ) {
@@ -179,15 +144,9 @@ impl AppConfig {
179144 }
180145 }
181146 if sub_exec. is_present ( "no_logging" ) {
182- //if let Some(no_logging) = sub_exec.value_of("no_logging") {
183- //AppConfig::set("no_logging", no_logging)?;
184- //}
185147 AppConfig :: set ( "no_logging" , "true" ) ?;
186148 }
187149 if sub_exec. is_present ( "pyspy_blocking" ) {
188- //if let Some(pyspy_blocking) = sub_exec.value_of("pyspy_blocking") {
189- //AppConfig::set("pyspy_blocking", pyspy_blocking)?;
190- //}
191150 AppConfig :: set ( "pyspy_blocking" , "true" ) ?;
192151 }
193152 if sub_exec. is_present ( "pyspy_idle" ) {
@@ -200,9 +159,6 @@ impl AppConfig {
200159 AppConfig :: set ( "pyspy_native" , "true" ) ?;
201160 }
202161 if sub_exec. is_present ( "rbspy_blocking" ) {
203- //if let Some(rbspy_blocking) = sub_exec.value_of("rbspy_blocking") {
204- //AppConfig::set("rbspy_blocking", rbspy_blocking)?;
205- //}
206162 AppConfig :: set ( "rbspy_blocking" , "true" ) ?;
207163 }
208164 if sub_exec. is_present ( "sample_rate" ) {
@@ -223,34 +179,12 @@ impl AppConfig {
223179 AppConfig :: set ( "tag" , tag. as_str ( ) ) ?;
224180 }
225181 }
226- // TODO: placeholder for future implementation
227- //if sub_exec.is_present("upstream_request_timeout") {
228- //if let Some(upstream_request_timeout) =
229- //sub_exec.value_of("upstream_request_timeout")
230- //{
231- //AppConfig::set("upstream_request_timeout", upstream_request_timeout)?;
232- //}
233- //}
234- //if sub_exec.is_present("upstream_threads") {
235- //if let Some(upstream_threads) = sub_exec.value_of("upstream_threads") {
236- //AppConfig::set("upstream_threads", upstream_threads)?;
237- //}
238- //}
239182 if sub_exec. is_present ( "application_name" ) {
240183 if let Some ( application_name) = sub_exec. value_of ( "application_name" ) {
241184 AppConfig :: set ( "application_name" , application_name) ?;
242185 }
243186 }
244- // TODO: placeholder for future implementation
245- //if sub_exec.is_present("auth_token") {
246- //if let Some(auth_token) = sub_exec.value_of("auth_token") {
247- //AppConfig::set("auth_token", auth_token)?;
248- //}
249- //}
250187 if sub_exec. is_present ( "detect_subprocesses" ) {
251- //if let Some(detect_subprocesses) = sub_exec.value_of("detect_subprocesses") {
252- //AppConfig::set("detect_subprocesses", detect_subprocesses)?;
253- //}
254188 AppConfig :: set ( "detect_subprocesses" , "true" ) ?;
255189 }
256190 if sub_exec. is_present ( "spy_name" ) {
0 commit comments