open-telemetry / open-telemetry/opentelemetry-python-contrib

Windows: the opentelemetry-instrument wrapper does not preserve parent-child process relationship

Open
#3,512 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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
  1. Programmatically start a Python program via opentelemetry-instrument wrapper.
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.