Welcome to the OpenTelemetry Python GenAI Instrumentations repository!
New to OpenTelemetry? Read the New Contributor Guide first — it covers the CLA, Code of Conduct, and other prerequisites.
If you are using AI agents to assist with contributions, please also read AGENTS.md for guidance on how to use them responsibly in this project.
- Python — see
tox.inifor the supported versions. uv— used to manage the workspace and to back thetoxtest environments.
├── instrumentation/
│ └── opentelemetry-instrumentation-<name>/ # one package per GenAI library
│ ├── src/opentelemetry/instrumentation/<name>/
│ ├── tests/
│ └── pyproject.toml
└── util/
└── opentelemetry-util-genai/ # shared GenAI utilities
├── src/opentelemetry/util/genai/
├── tests/
└── pyproject.toml
The monorepo uses uv workspaces; each package owns its own pyproject.toml,
version, and entry points. tox.ini defines the test matrix.
Install all packages and dev tools into a single workspace virtual environment:
uv sync --frozen --all-packagesuv run pre-commit run ruff --all-filesRun the test environment for the package you changed (append -oldest or
-latest for the version variants defined in tests/requirements.{oldest,latest}.txt):
uv run tox -e py312-test-instrumentation-openai-v2-latestRun type checking across the workspace:
uv run tox -e typecheckThis repo uses towncrier to manage
changelogs. Each PR with user-visible impact must add a changelog fragment
under the affected package's .changelog/ directory rather than editing
CHANGELOG.md directly.
Fragment path: <package>/.changelog/<PR_NUMBER>.<TYPE>
Types: added, changed, deprecated, removed, fixed.
The file contains a one-line description. For example,
instrumentation/opentelemetry-instrumentation-anthropic/.changelog/123.fixed:
fix request hook not being called when stream=True
Don't include the PR number in the body — towncrier appends it from the filename.
Preview the rendered changelogs locally:
uv run tox -e changelog-previewIf your change doesn't need an entry (pure docs/tooling), add the
Skip Changelog label to the PR.
One logical change per PR. Don't bundle unrelated fixes, refactors, or features — split them so each can be reviewed and reverted independently. Small, focused PRs are much easier to review, and therefore much more likely to land quickly.
If a PR review surfaces contentious or difficult points, consider splitting those into follow-up PRs so the uncontroversial parts can land and each of the harder points gets its own focused discussion and review.
Post in #otel-genai-instrumentation on CNCF Slack or join the next GenAI SIG meeting and add your topic to the meeting agenda. See the community repo for current meeting times.
- Trask Stalnaker, Microsoft
- Liudmila Molkova
- Aaron Abbott, Google
For more information about the maintainer role, see the community repository.
- Dylan Russell, Google
- Mike Goldsmith, Honeycomb
- Keith Decker, Cisco
- Leighton Chen, Microsoft
For more information about the approver role, see the community repository.