diff --git a/src/main/java/org/datadog/jmxfetch/App.java b/src/main/java/org/datadog/jmxfetch/App.java index 00ab71d4b..ddb6f1de8 100644 --- a/src/main/java/org/datadog/jmxfetch/App.java +++ b/src/main/java/org/datadog/jmxfetch/App.java @@ -968,7 +968,7 @@ private Map getTelemetryInstanceConfig() { config.put("name","jmxfetch_telemetry_instance"); config.put("collect_default_jvm_metrics",true); config.put("new_gc_metrics",true); - config.put("process_name_regex",".*org.datadog.jmxfetch.App.*"); + config.put("jvm_direct",true); config.put("normalize_bean_param_tags",true); List conf = new ArrayList(); diff --git a/src/main/java/org/datadog/jmxfetch/Instance.java b/src/main/java/org/datadog/jmxfetch/Instance.java index a2c5cbce4..770a8f863 100644 --- a/src/main/java/org/datadog/jmxfetch/Instance.java +++ b/src/main/java/org/datadog/jmxfetch/Instance.java @@ -479,7 +479,11 @@ public void init(boolean forceNewConnection) @Override public String toString() { if (isDirectInstance(instanceMap)) { - return "jvm_direct"; + if (this.instanceMap.get("name") != null) { + return "jvm_direct - name: `" + (String) this.instanceMap.get("name") + "`"; + } else { + return "jvm_direct"; + } } else if (this.instanceMap.get(PROCESS_NAME_REGEX) != null) { return "process_regex: `" + this.instanceMap.get(PROCESS_NAME_REGEX) + "`"; } else if (this.instanceMap.get("name") != null) {