Skip to content

Commit

Permalink
Stripped arguments from Java app id (#318)
Browse files Browse the repository at this point in the history
* Stripped arguments from Java app id

* use sun.java.command for -jar as well

* bumped version to 1.2.17
  • Loading branch information
liorgorb authored Mar 13, 2022
1 parent 264cb20 commit d3e5c9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gprofiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Copyright (c) Granulate. All rights reserved.
# Licensed under the AGPL3 License. See LICENSE.md in the project root for license information.
#
__version__ = "1.2.16"
__version__ = "1.2.17"
2 changes: 1 addition & 1 deletion gprofiler/metadata/application_identifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def get_application_name(self, process: Process) -> Optional[str]:
java_properties = run_process([jattach_path(), str(process.pid), "properties"]).stdout.decode()
for line in java_properties.splitlines():
if line.startswith("sun.java.command"):
app_id = line[line.find("=") + 1 :]
app_id = line[line.find("=") + 1 :].split(" ", 1)[0]
return f"java: {app_id} ({_append_file_to_proc_wd(process, app_id)})"
except CalledProcessError as e:
_logger.warning(f"Couldn't get Java properties for process {process.pid}: {e.stderr}")
Expand Down

0 comments on commit d3e5c9d

Please sign in to comment.