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

process.name is truncated when running system module on mac #22404

Closed
kaiyan-sheng opened this issue Nov 3, 2020 · 3 comments
Closed

process.name is truncated when running system module on mac #22404

kaiyan-sheng opened this issue Nov 3, 2020 · 3 comments
Assignees
Labels
Team:Integrations Label for the Integrations team

Comments

@kaiyan-sheng
Copy link
Contributor

When working on system.process metricset on mac os, I see some of the process names are truncated. For example:
Screen Shot 2020-11-03 at 1 08 40 PM

I don't see a limit set in ECS process field documentation so I suspect the problem might be in Go sigar. This will need more investigation on different operating systems.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 3, 2020
@kaiyan-sheng kaiyan-sheng added the Team:Integrations Label for the Integrations team label Nov 3, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 3, 2020
@fearful-symmetry
Copy link
Contributor

Digging into this. The C API we're accessing returns data via this struct: https://github.com/apple/darwin-xnu/blob/a449c6a3b8014d9406c2ddbdc81795da24aa7443/bsd/sys/proc_info.h#L63

The name field we're accessing is in this field:

char			pbi_comm[MAXCOMLEN];

Here, MAXCOMLEN is set to 16: https://github.com/apple/darwin-xnu/blob/0a798f6738bc1db01281fc08ae024145e84df927/osfmk/mach/resource_monitors.h#L66

So this appears to be a limitation of the OS API we're using.

There's pbi_name, but the code implies that it could be empty:

char			pbi_name[2*MAXCOMLEN];	/* empty if no name is registered */

@jlind23
Copy link
Collaborator

jlind23 commented Apr 5, 2022

Backlog grooming: Closing it for now until further activity.

@jlind23 jlind23 closed this as completed Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Integrations Label for the Integrations team
Projects
None yet
Development

No branches or pull requests

4 participants