Skip to content

process.executable.name shouldn't use /proc/[pid]/status #1736

@braydonk

Description

@braydonk

Area(s)

area:process

Is your change request related to a problem? Please describe.

Today, the process.executable.name attribute has the following description:

The name of the process executable. On Linux based systems, can be set
to the `Name` in `proc/[pid]/status`. On Windows, can be set to the
base name of `GetProcessImageFileNameW`.

The Windows guidance in the description will provide an accurate result, but the Linux guidance is problematic. /proc/[pid]/status may not have the executable name under two circumstances:

  1. The executable name is longer than 15 characters (TASK_COMM_LEN-1) (man page)
  2. The process name is changed by the process using prctl(PR_SET_NAME,...) (man page)

Describe the solution you'd like

The current description for process.executable.name should instead be applied to a new attribute called process.name, and process.executable.name should have guidance adjusted so that it actually will represent the executable name.

Describe alternatives you've considered

No response

Additional context

Issue was first brought forward by @christos68k in the Semantic Conventions WG meeting on Jan 6, 2025. Further discussion took place in the #otel-system-metrics CNCF Slack channel.

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions