@@ -80,7 +80,6 @@ public class WorkerThread implements Runnable {
80
80
private WorkerLifeCycle lifeCycle ;
81
81
private int responseTimeout ;
82
82
private long recoveryStartTS ; // 0: default value. no recovery needed, in healthy mode
83
- private String telemetryPath = System .getenv ("SM_TELEMETRY_LOG_REV_2022_12" );
84
83
85
84
public WorkerThread (
86
85
ConfigManager configManager ,
@@ -179,9 +178,7 @@ public void run() {
179
178
currentThread .set (thread );
180
179
BaseModelRequest req = null ;
181
180
int status = HttpURLConnection .HTTP_INTERNAL_ERROR ;
182
- if (telemetryPath != null ) {
183
- loggerTelemetryMetrics .info ("Telemetry enabled." );
184
- }
181
+
185
182
try {
186
183
connect ();
187
184
@@ -286,15 +283,15 @@ public void run() {
286
283
} catch (OutOfMemoryError oom ) {
287
284
logger .error ("Out of memory error when creating workers" , oom );
288
285
status = HttpURLConnection .HTTP_ENTITY_TOO_LARGE ;
289
- if (telemetryPath != null ) {
286
+ if (java . lang . System . getenv ( "SM_TELEMETRY_LOG" ) != null ) {
290
287
loggerTelemetryMetrics .info (
291
288
"ModelServerError.Count:1|#TorchServe:{},{}:-1" ,
292
289
ConfigManager .getInstance ().getVersion (),
293
290
oom .getClass ().getCanonicalName ());
294
291
}
295
292
} catch (Throwable t ) {
296
293
logger .warn ("Backend worker thread exception." , t );
297
- if (telemetryPath != null ) {
294
+ if (java . lang . System . getenv ( "SM_TELEMETRY_LOG" ) != null ) {
298
295
loggerTelemetryMetrics .info (
299
296
"ModelServerError.Count:1|#TorchServe:{},{}:-1" ,
300
297
ConfigManager .getInstance ().getVersion (),
0 commit comments