Skip to content

Commit e10b807

Browse files
committed
Mute JMXFetch Shutdown in progress error
1 parent 0db6312 commit e10b807

File tree

1 file changed

+9
-2
lines changed
  • dd-java-agent/agent-jmxfetch/src/main/java/datadog/trace/agent/jmxfetch

1 file changed

+9
-2
lines changed

dd-java-agent/agent-jmxfetch/src/main/java/datadog/trace/agent/jmxfetch/JMXFetch.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,16 @@ public void run() {
142142
if (!appConfig.getExitWatcher().shouldExit()) {
143143
try {
144144
final int result = app.run();
145-
log.error("jmx collector exited with result: {}", result);
145+
if (result != 0) {
146+
log.error("jmx collector exited with result: {}", result);
147+
}
146148
} catch (final Exception e) {
147-
log.error("Exception in jmx collector thread", e);
149+
String message = e.getMessage();
150+
boolean ignoredException =
151+
message != null && message.startsWith("Shutdown in progress");
152+
if (!ignoredException) {
153+
log.error("Exception in jmx collector thread", e);
154+
}
148155
}
149156
}
150157
// always wait before next attempt

0 commit comments

Comments
 (0)