Skip to content

Commit d3e5c9d

Browse files
authored
Stripped arguments from Java app id (#318)
* Stripped arguments from Java app id * use sun.java.command for -jar as well * bumped version to 1.2.17
1 parent 264cb20 commit d3e5c9d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gprofiler/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright (c) Granulate. All rights reserved.
33
# Licensed under the AGPL3 License. See LICENSE.md in the project root for license information.
44
#
5-
__version__ = "1.2.16"
5+
__version__ = "1.2.17"

gprofiler/metadata/application_identifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def get_application_name(self, process: Process) -> Optional[str]:
251251
java_properties = run_process([jattach_path(), str(process.pid), "properties"]).stdout.decode()
252252
for line in java_properties.splitlines():
253253
if line.startswith("sun.java.command"):
254-
app_id = line[line.find("=") + 1 :]
254+
app_id = line[line.find("=") + 1 :].split(" ", 1)[0]
255255
return f"java: {app_id} ({_append_file_to_proc_wd(process, app_id)})"
256256
except CalledProcessError as e:
257257
_logger.warning(f"Couldn't get Java properties for process {process.pid}: {e.stderr}")

0 commit comments

Comments
 (0)