-
Notifications
You must be signed in to change notification settings - Fork 182
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
add process.name attribute #1737
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
model/process/registry.yaml
Outdated
stability: experimental | ||
brief: > | ||
The name of the process. On Linux based systems, can be set | ||
to the `Name` in `proc/[pid]/status`. On Windows, can be set to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to the `Name` in `proc/[pid]/status`. On Windows, can be set to the | |
to the value in `/proc/[pid]/comm` or to the (equivalent) | |
`Name` in `/proc/[pid]/status`. On Windows, can be set to the |
We can also use /proc/[pid]/comm
which requires no parsing, unlike extracting Name
out of /proc/[pid]/status
. The values should be equivalent.
Also see:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about suggesting both since they're the same anyway? For example, in the hostmetricsreceiver we'll already have parsed /proc/[pid]/status
for other information, so just getting the name from that is fine in our case, but in other cases people might prefer to just get /proc/[pid]/comm
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 5a679fd
.chloggen/process_name.yaml
Outdated
# Use pipe (|) for multiline entries. | ||
subtext: | | ||
The new `process.name` attribute uses the original guidance for `process.executable.name`, | ||
suggesting use of the `Name` field from `/proc/[pid]/status` on Linux. `process.executable.name` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggesting use of the `Name` field from `/proc/[pid]/status` on Linux. `process.executable.name` | |
suggesting use of `/proc/[pid]/comm` or the equivalent `Name` field | |
from `/proc/[pid]/status` on Linux. `process.executable.name` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 5a679fd
type: string | ||
stability: experimental | ||
brief: > | ||
The name of the process. On Linux based systems, can be set to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can or SHOULD ?
to the `Name` in `proc/[pid]/status`. On Windows, can be set to the | ||
base name of `GetProcessImageFileNameW`. | ||
to the base name of the target of `/proc/[pid]/exe`. On Windows, | ||
can be set to the base name of `GetProcessImageFileNameW`. | ||
examples: ['otelcol'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be possible to have an example that's different between process.name
and process.executable.name
?
to the `Name` in `proc/[pid]/status`. On Windows, can be set to the | ||
base name of `GetProcessImageFileNameW`. | ||
to the base name of the target of `/proc/[pid]/exe`. On Windows, | ||
can be set to the base name of `GetProcessImageFileNameW`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems process.name
and process.executable.name
are always the same on windows - is it the case?
In the spirit of T-shaped API, do you think it could be one of these linux-specific things? I.e. process.linux.exe|exectuable.name
?
Fixes #1736
Changes
This PR adds a new attribute
process.name
that uses the description that used to apply toprocess.executable.name
. Theprocess.executable.name
attribute's description is adjusted such that the value of the attribute will reliably contain the executable name.Merge requirement checklist
[chore]