Skip to content

Conversation

@thompson-tomo
Copy link
Contributor

@thompson-tomo thompson-tomo commented Aug 19, 2025

Progresses #2655

Changes

This introduces a new process executable entity which describes the executable being run by the process.

This entity is designed to be consistent across all instances regardless of machine or where files are placed.

Note: if the PR is touching an area that is not listed in the existing areas, or the area does not have sufficient domain experts coverage, the PR might be tagged as experts needed and move slowly until experts are identified.

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • Change log entry added, according to the guidelines in When to add a changelog entry.
    • If your PR does not need a change log, start the PR title with [chore]
  • Links to the prototypes or existing instrumentations (when adding or changing conventions)

name: process.executable
brief: The executable which is being run by the process.
attributes:
- ref: process.executable.name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you select which ones of these will be identifying or descriptive?

Copy link
Contributor Author

@thompson-tomo thompson-tomo Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, should the identity attribute values change if the executable is updated to a new version? If so we would probs need an additional attribute for version or everything becomes identity.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a question for how this entity will be used and tracked in the system.

As I think this entity is MOST relevant to @open-telemetry/profiling-maintainers - I'd like to get there take on what "identity" for an executable should be.

Do you want to group profiles by an executable by "concept" or "by its version"? I suspect it's the later...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be used as either but what I will do is define it without a version (this PR) and create a seperate pr to introduce a new attribute and add it to the entity as identifying as I see a couple of options to address it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seperate PR for adding an attribute for executable version #2673.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In profiling, process.executable.build_id.htlhash is used to uniquely identify executables when 1-1 accuracy is needed (e.g. symbolization) but for other cases (e.g. visualization of flamegraphs) one may use process.executable.name, which introduces fuzziness (e.g. multiple different executables, which could be entirely unrelated functionality-wise, with the same executable name collapsed under one entity).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds to me like we want the executable to be identified by the build-id, and the name is a descriptive attirbute which can be used for grouping.

@braydonk / @christos68k - I think this is worth further discussion

Copy link
Contributor Author

@thompson-tomo thompson-tomo Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's worth noting that it's not uncommon but possible for an executable to be renamed while a process is running. Based on the instrumentation instructions for this attribute, someone mving an executable during a process's runtime will result in a new name being retrieved. I haven't tried on Windows, but I'm pretty sure that renaming an executable while a process running will result in a new value from GetProcessImageFileNameW, so the same would apply if I'm remembering correctly (needs validation).

@braydonk Actually if the path to the executable is all that is changed and the file name renames the same the value of the name attribute wouldn't change.

I am more than happy to introduce a new attribute to use as the identifying attribute.

Howabout I set the name to descriptive in this PR or even leave it unset & we use #2673 for defining a new identifying attribute.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's important that the profiling SIG make the decision for what the identifying attribute(s) should be. Based on my discussion with them we at least agreed on the name not being identifying so we'll start with that, and it seems like the attribute @christos68k mentioned above is likely the best candidate, but it sounded like the Profiling SIG had other things to work through before making the final decision if I understood correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I have made the name attribute to be descriptive and the htlhash to not have a role so that we can discuss seperately if htlhash is the identity and the description is updated. Let me know if this PR nneeds any additional changes.

@github-actions
Copy link

github-actions bot commented Sep 7, 2025

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 7, 2025
@thompson-tomo
Copy link
Contributor Author

Sig have approved and requested extension has been done. Awaiting feedback.

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added Stale and removed Stale labels Sep 24, 2025
@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 11, 2025
@thompson-tomo thompson-tomo force-pushed the feature/#2655_process_executable branch from ee4a4a7 to 60c08f2 Compare October 12, 2025 01:09
@github-actions github-actions bot removed the Stale label Oct 12, 2025
@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 27, 2025
@thompson-tomo thompson-tomo force-pushed the feature/#2655_process_executable branch 3 times, most recently from bf789e3 to b6c341c Compare October 28, 2025 08:31
@github-actions github-actions bot removed the Stale label Oct 29, 2025
@braydonk braydonk self-requested a review October 29, 2025 17:08
@thompson-tomo thompson-tomo force-pushed the feature/#2655_process_executable branch from 5d55abf to d1ebd89 Compare November 4, 2025 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:process enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

5 participants