Skip to content

Commit c2cdcfb

Browse files
namannandanlxningagunapal
authored
Revert "Update Telemetry env variable. (#2356)" (#2413)
This reverts commit 7270447. Co-authored-by: lxning <[email protected]> Co-authored-by: Ankith Gunapal <[email protected]>
1 parent 1a4f44f commit c2cdcfb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

frontend/server/src/main/java/org/pytorch/serve/wlm/WorkerThread.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ public class WorkerThread implements Runnable {
8080
private WorkerLifeCycle lifeCycle;
8181
private int responseTimeout;
8282
private long recoveryStartTS; // 0: default value. no recovery needed, in healthy mode
83-
private String telemetryPath = System.getenv("SM_TELEMETRY_LOG_REV_2022_12");
8483

8584
public WorkerThread(
8685
ConfigManager configManager,
@@ -179,9 +178,7 @@ public void run() {
179178
currentThread.set(thread);
180179
BaseModelRequest req = null;
181180
int status = HttpURLConnection.HTTP_INTERNAL_ERROR;
182-
if (telemetryPath != null) {
183-
loggerTelemetryMetrics.info("Telemetry enabled.");
184-
}
181+
185182
try {
186183
connect();
187184

@@ -286,15 +283,15 @@ public void run() {
286283
} catch (OutOfMemoryError oom) {
287284
logger.error("Out of memory error when creating workers", oom);
288285
status = HttpURLConnection.HTTP_ENTITY_TOO_LARGE;
289-
if (telemetryPath != null) {
286+
if (java.lang.System.getenv("SM_TELEMETRY_LOG") != null) {
290287
loggerTelemetryMetrics.info(
291288
"ModelServerError.Count:1|#TorchServe:{},{}:-1",
292289
ConfigManager.getInstance().getVersion(),
293290
oom.getClass().getCanonicalName());
294291
}
295292
} catch (Throwable t) {
296293
logger.warn("Backend worker thread exception.", t);
297-
if (telemetryPath != null) {
294+
if (java.lang.System.getenv("SM_TELEMETRY_LOG") != null) {
298295
loggerTelemetryMetrics.info(
299296
"ModelServerError.Count:1|#TorchServe:{},{}:-1",
300297
ConfigManager.getInstance().getVersion(),

0 commit comments

Comments
 (0)