Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java attacher support for macOS #8718

Open
eyalkoren opened this issue Jul 26, 2022 · 6 comments · Fixed by #9413
Open

Java attacher support for macOS #8718

eyalkoren opened this issue Jul 26, 2022 · 6 comments · Fixed by #9413

Comments

@eyalkoren
Copy link
Contributor

The Java attacher discovery relies on go-sysinfo, which requires cgo for macOS, which is not built into APM Server.
Optional alternatives:

@marclop
Copy link
Contributor

marclop commented Aug 15, 2022

I've started looking into changing go-sysinfo to use a non cgo implementation to gather the required information for Darwin. It looks like the latest published tags for golang.org/x/sys expose a more complete API to perform sysctl and syscall without relying on cgo or syscall.syscall6 calls.

@marclop
Copy link
Contributor

marclop commented Aug 23, 2022

I'm going to move this back to the Ready column as I haven't yet started implementing the necessary changes in go-sysinfo.

@eyalkoren
Copy link
Contributor Author

Once the discovery part is handled, we will still need to adjust the per-user tmp dir copy. In macOS, the Go utility to create temp dir (or find tmp dir root) would return a path to a directory which is specific to the current user (i.e. the APM Server user).
AFAIK, the functionality to run as a different user we already have in place is applicable to macOS, which means that we can run echo $TMPDIR as the target user and read the command output to reveal the user-specific temp folder.

@simitt
Copy link
Contributor

simitt commented Sep 23, 2022

Tracking the removal of the technical blockers in #9185

@simitt
Copy link
Contributor

simitt commented Oct 24, 2022

Reopening until #8718 (comment) is addressed.

@simitt simitt reopened this Oct 24, 2022
@eyalkoren
Copy link
Contributor Author

MacOS is mostly supported now without relying on cgo.
However, the process start time is not supported yet, so we'll need to find an alternative to identify a process instance, which currently relies on PID+start-time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants