open-telemetry / open-telemetry/opentelemetry-python-contrib
Windows: the opentelemetry-instrument wrapper does not preserve parent-child process relationship
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
Describe your environment
OS: Windows 11
Python version: 3.12.10
Package version: 1.33.0
What happened?
See repro & expected
Steps to Reproduce
- Programmatically start a Python program via
opentelemetry-instrumentwrapper. - Observe the process hierarchy.
Expected Result
The started program should stay in the process tree, e.g.
launcher program (grandparent)
|--> opentelemetry-instrument.exe (parent)
|--> started program (child)
The telemetry wrapper should keep running (forwarding stdin/stdout/stderr and CTRL_C to the started program as necessary).
Actual Result
The started program is not part of the launched program process tree. opentelemetry-instrument.exe process exits immediately after the started program is launched.
Additional context
This behavior breaks development tools like .NET Aspire, which rely on the fact that child processes are part of the same process tree to discover all children and clean them up during shutdown.
Would you like to implement a fix?
None
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the opentelemetry-instrument wrapper entry point and reproduce the process hierarchy on Windows 11 with Python 3.12.10. Done means the wrapper remains the parent, forwards stdin/stdout/stderr and CTRL_C as needed, and keeps the started program in the process tree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100