[Resources.Process] Add process.creation.time#4036
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4036 +/- ##
==========================================
- Coverage 76.04% 73.47% -2.58%
==========================================
Files 466 454 -12
Lines 18695 17588 -1107
==========================================
- Hits 14217 12922 -1295
- Misses 4478 4666 +188
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds additional OpenTelemetry process resource attributes to align OpenTelemetry.Resources.Process with semantic conventions v1.40.0.
Changes:
- Add semantic convention keys for
process.executable.pathandprocess.args_count. - Extend
ProcessDetectorto emit executable path and argument count attributes. - Update unit test to assert the presence/types of the new attributes and bump expected attribute count.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| test/OpenTelemetry.Resources.Process.Tests/ProcessDetectorTests.cs | Updates assertions to cover the two new process attributes. |
| src/OpenTelemetry.Resources.Process/ProcessSemanticConventions.cs | Adds constants for the new semantic convention attribute names. |
| src/OpenTelemetry.Resources.Process/ProcessDetector.cs | Implements collection of executable path and args count. |
| src/OpenTelemetry.Resources.Process/CHANGELOG.md | Documents the new attributes (currently with a placeholder PR link). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@martincostello, can you check executing this detector with |
|
These are the results. Looks like dotnet rundotnet foo.dllfoo.exe |
|
@Kielek I removed |
Collect the `process.executable.path` and `process.args_count` attributes. Contributes to open-telemetry#1515.
- Add `process.command`. - Add `process.creation.time`. - Add `process.title`. - Add `process.working_directory`. - Address review comments.
Add PR number.
Improve fallback behaviour for getting the process' path.
Fix incorrect variable being used.
`process.command` isn't reliable with the different modes of executing modern .NET processes.
|
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Move to unreleased.
|
@martincostello it seems requirement level recently changed for some of the attributes this PR adds: https://github.com/open-telemetry/semantic-conventions/blob/v1.41.0/docs/resource/process.md |
Update changes to target Semantic Conventions v1.41.0.
Previous testing showed the value not to be reliable. As it isn't required, just recommended, removing for now.
Leftover from previous commit.
|
@lachmatt Done - this reduces the PR to just adding |
- Remove leftovers from v1.40.0. - Update README.
Contributes to #1515.
Changes
Collect new attribute based on v1.41.0 of the semantic conventions:
process.args_countprocess.commandprocess.creation.timeprocess.executable.pathprocess.titleprocess.working_directoryBased on Selecting process attributes, I went withprocess.executable.pathas it can be used to deriveprocess.executable.name, andprocess.args_countso that we do not need to implement redaction forprocess.command_lineand/orprocess.command_args.Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)