opentelemetry-test-utils
Test utilities for OpenTelemetry unit tests
What it is and what it does
OpenTelemetry Test Utils is a support package within the OpenTelemetry Python project that supplies test utilities and fixtures for writing unit tests. It is designed to help developers test OpenTelemetry instrumentation and SDK code by providing reusable testing helpers. The package depends on opentelemetry-api, opentelemetry-sdk, asgiref, and requests, making it part of the broader OpenTelemetry ecosystem.
This is a Beta-status package (Development Status :: 4 - Beta) that supports Python 3.10 through 3.14. It is maintained by the OpenTelemetry community and receives regular updates. The package is not intended as a standalone tool but rather as a dependency for projects that need to test their own OpenTelemetry instrumentation code.
Use it for:
- Writing unit tests for custom OpenTelemetry instrumentation packages
- Testing OpenTelemetry SDK extensions and exporters
- Validating trace and metric collection in your instrumented application code
- Setting up test fixtures for telemetry-related test suites
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides test utilities and helpers for writing unit tests for OpenTelemetry instrumentation and SDK code.
Yes, if you are developing OpenTelemetry instrumentation or testing SDK code. Install it as a test dependency (dev/test requirements) in projects that need to validate their own telemetry logic. Not needed for applications that only consume OpenTelemetry instrumentation.
Install
opentelemetry-test-utils on PyPI
pip
pip install opentelemetry-test-utilsuv
uv add opentelemetry-test-utilspoetry
poetry add opentelemetry-test-utilsInstalling opentelemetry-test-utils
Before you install
Low install friction with a pure-Python wheel. Actively maintained as part of the OpenTelemetry project with a recent release (29 days ago) and active repository status.
License in practice
Licensed under Apache-2.0 (permissive), which allows free use, modification, and distribution with minimal restrictions.
Quickstart
pip install opentelemetry-test-utils
from opentelemetry_test_utils import ...
# Use test utilities in your test suite
Requires Python 3.10 or later; intended for use within test code, not production applications.
Verify before relying
- What specific test utilities and fixtures are included in this package
- Whether this package is intended for end-user testing or only for OpenTelemetry developers
- Compatibility guarantees with specific versions of opentelemetry-api and opentelemetry-sdk
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — asgiref, opentelemetry-api, opentelemetry-sdk, requests |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 651,231/month — #5,552 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_test_utils-0.65b0-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-distroProvides a Python distribution package for…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-loggingIntegrates Python's standard logging module…
permissive · top 1,000 on PyPI
opentelemetry-contrib-instrumentationsA meta-package that installs all OpenTelemetry…
permissive · top 15,000 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-instrumentation-exceptionsAutomatically captures uncaught exceptions in…
permissive · top 15,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-openai-agents-v2Automatically captures telemetry data from…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-structlogIntegrates structlog logging with OpenTelemetry…
permissive · top 15,000 on PyPI