Skip to content

Commit

Permalink
Revert "Update Telemetry env variable. (#2356)" (#2413)
Browse files Browse the repository at this point in the history
This reverts commit 7270447.

Co-authored-by: lxning <23464292+lxning@users.noreply.github.com>
Co-authored-by: Ankith Gunapal <agunapal@ischool.Berkeley.edu>
  • Loading branch information
3 people authored Jun 14, 2023
1 parent 1a4f44f commit c2cdcfb
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public class WorkerThread implements Runnable {
private WorkerLifeCycle lifeCycle;
private int responseTimeout;
private long recoveryStartTS; // 0: default value. no recovery needed, in healthy mode
private String telemetryPath = System.getenv("SM_TELEMETRY_LOG_REV_2022_12");

public WorkerThread(
ConfigManager configManager,
Expand Down Expand Up @@ -179,9 +178,7 @@ public void run() {
currentThread.set(thread);
BaseModelRequest req = null;
int status = HttpURLConnection.HTTP_INTERNAL_ERROR;
if (telemetryPath != null) {
loggerTelemetryMetrics.info("Telemetry enabled.");
}

try {
connect();

Expand Down Expand Up @@ -286,15 +283,15 @@ public void run() {
} catch (OutOfMemoryError oom) {
logger.error("Out of memory error when creating workers", oom);
status = HttpURLConnection.HTTP_ENTITY_TOO_LARGE;
if (telemetryPath != null) {
if (java.lang.System.getenv("SM_TELEMETRY_LOG") != null) {
loggerTelemetryMetrics.info(
"ModelServerError.Count:1|#TorchServe:{},{}:-1",
ConfigManager.getInstance().getVersion(),
oom.getClass().getCanonicalName());
}
} catch (Throwable t) {
logger.warn("Backend worker thread exception.", t);
if (telemetryPath != null) {
if (java.lang.System.getenv("SM_TELEMETRY_LOG") != null) {
loggerTelemetryMetrics.info(
"ModelServerError.Count:1|#TorchServe:{},{}:-1",
ConfigManager.getInstance().getVersion(),
Expand Down

0 comments on commit c2cdcfb

Please sign in to comment.