Skip to content

feat: add ability to auto-instrument subprocesses#4469

Open
herin049 wants to merge 7 commits intoopen-telemetry:mainfrom
herin049:feat/subprocess-auto-instrumentation
Open

feat: add ability to auto-instrument subprocesses#4469
herin049 wants to merge 7 commits intoopen-telemetry:mainfrom
herin049:feat/subprocess-auto-instrumentation

Conversation

@herin049
Copy link
Copy Markdown
Contributor

@herin049 herin049 commented Apr 21, 2026

Description

Adds the ability to auto-instrument subprocesses via opentelemetry-instrument. This PR enables auto-instrumenting Uvicorn with multiple workers via:

opentelemetry-instrument --auto_instrumentation_instrument_subprocesses true uvicorn main:app --workers 4 --host 0.0.0.0 --port 8000

Fixes open-telemetry/opentelemetry-python#4927

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?

uv run tox -e py312-test-opentelemetry-instrumentation-wrapt2

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

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

@herin049 herin049 requested a review from a team as a code owner April 21, 2026 03:20
@herin049 herin049 moved this to Ready for review in Python PR digest Apr 23, 2026
Copy link
Copy Markdown
Member

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

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

Looks good - thanks @herin049. Need to move changelog.

Comment thread CHANGELOG.md Outdated
@github-project-automation github-project-automation Bot moved this from Ready for review to Approved PRs in Python PR digest Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

Support for uvicorn with multiple workers

3 participants