Rename to heap dump
@@ -24,7 +24,7 @@ import java.util.regex.Pattern;
public class CoreCollector {
private static final Logger logger = Logger.getLogger(CoreCollector.class.getName());
- private static final Pattern JAVA_CORE_PATTERN = Pattern.compile("java_pid.*\\.hprof");
+ private static final Pattern JAVA_HEAP_DUMP_PATTERN = Pattern.compile("java_pid.*\\.hprof");
private static final Pattern CORE_GENERATOR_PATH_PATTERN = Pattern.compile("^Core was generated by `(?<path>.*?)'.$");
private static final Pattern EXECFN_PATH_PATTERN = Pattern.compile("^.* execfn: '(?<path>.*?)'");
private static final Pattern FROM_PATH_PATTERN = Pattern.compile("^.* from '(?<path>.*?)'");
@@ -102,7 +102,7 @@ public class CoreCollector {
* @return map of relevant metadata about the core dump
*/
Map<String, Object> collect(NodeAgentContext context, Path coredumpPath) {
- if (JAVA_CORE_PATTERN.matcher(coredumpPath.getFileName().toString()).matches())
+ if (JAVA_HEAP_DUMP_PATTERN.matcher(coredumpPath.getFileName().toString()).matches())
return Map.of("bin_path", "java");
Map<String, Object> data = new HashMap<>();
