Skip to content

opentelemetry-sdk: fix values for process.executable resource attributes - #5535

Merged
xrmx merged 2 commits into
open-telemetry:mainfrom
xrmx:fix-resource-process-executable
Aug 14, 2026
Merged

opentelemetry-sdk: fix values for process.executable resource attributes#5535
xrmx merged 2 commits into
open-telemetry:mainfrom
xrmx:fix-resource-process-executable

Conversation

@xrmx

@xrmx xrmx commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Per registry [1]:

  • process.executable.name should be the base name of the executable
  • process.executable.path should be the full path of the executable

Now for name we send the full path and for path only the parent directory.

[1] https://opentelemetry.io/docs/specs/semconv/registry/attributes/process/

Spotted this when looking at #5459

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Per registry [1]:
- process.executable.name should be the base name of the executable
- process.executable.path should be the full path of the executable

Now for name we sent the full path and for path only the parent
directory.

[1] https://opentelemetry.io/docs/specs/semconv/registry/attributes/process/
@xrmx
xrmx requested a review from a team as a code owner August 11, 2026 10:46
@xrmx xrmx changed the title opentelemetry-sdk: fix values for process.executable opentelemetry-sdk: fix values for process.executable resource attributes Aug 11, 2026
@xrmx

xrmx commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Would appreciate if anyone on windows can double check what does sys.executable report there.

@JacksonWeber

Copy link
Copy Markdown
Contributor

Would appreciate if anyone on windows can double check what does sys.executable report there.

Confirmed on Windows: sys.executable returns the full path to the interpreter, for example C:...\python.exe. So, this change will set the name to python.exe and the path to the full executable path, as expected.

@github-project-automation github-project-automation Bot moved this to Approved PRs in Python PR digest Aug 12, 2026
Comment thread opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py
@xrmx
xrmx added this pull request to the merge queue Aug 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 14, 2026
@xrmx
xrmx added this pull request to the merge queue Aug 14, 2026
@xrmx xrmx moved this from Approved PRs to Ready for merge in Python PR digest Aug 14, 2026
Merged via the queue into open-telemetry:main with commit 5533cc3 Aug 14, 2026
578 checks passed
@xrmx
xrmx deleted the fix-resource-process-executable branch August 14, 2026 09:42
@github-project-automation github-project-automation Bot moved this from Ready for merge to Done in Python PR digest Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants