$npx skillfedfor your agent

pytest-opentelemetry

A pytest plugin for instrumenting test runs via OpenTelemetry

With conditionsPyPI TestingReleased Apr 20251.2M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_opentelemetry-1.1.0-py3-none-any.whl
v1.1.0 · released 2025-04-25 · Python >=3.8 · 5 runtime deps: opentelemetry-api, opentelemetry-container-distro, opentelemetry-sdk, opentelemetry-semantic-conventions, pytest

Yes, if you already use or plan to adopt OpenTelemetry for observability and want detailed visibility into test performance. The plugin is actively maintained, has no known vulnerabilities, and integrates cleanly with pytest. Install it if you need to profile test bottlenecks or correlate test execution with application traces; skip it if you have no observability infrastructure or don't need test-level tracing.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires an OpenTelemetry Collector or compatible OTLP gRPC endpoint running (default http://localhost:4317); only OTLP over gRPC exporter is currently supported.
  • Low friction installation as a pure Python wheel.
  • Actively maintained with a recent release (2025-04-25) and ongoing commits; last commit 2026-07-26.

License · maintenance · safety

permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute this plugin freely in commercial and private projects with minimal restrictions.

last release 2025-04-25 (476 days) · last repo commit 2026-07-26 · 40 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,205,304 downloads/mo, #4,225 on PyPI

Verify before relying

pip install pytest-opentelemetry

pytest --export-traces

# With custom collector endpoint:
export OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317
pytest --export-traces
  • Whether pytest-xdist integration works with all versions of pytest-xdist or has known incompatibilities.
  • Performance overhead of instrumentation on test suite runtime when traces are exported.
  • Support for other OpenTelemetry exporters beyond OTLP gRPC in future versions.
Same gist for agents: .md · .json

What it is and what it does

pytest-opentelemetry is a pytest plugin that automatically captures detailed timing and execution data from your test runs as OpenTelemetry spans, then exports them to a tracing backend. It integrates seamlessly with pytest as a plugin—just install it and use the --export-traces flag to start collecting traces. By default it sends data to http://localhost:4317 (an OpenTelemetry Collector), which you can redirect to visualization tools like Jaeger.

The plugin helps identify test bottlenecks and performance regressions by giving you a detailed timeline of what your tests are doing. It works especially well with applications already instrumented with OpenTelemetry, letting you see the full stack from test code through database queries and network calls. It also supports pytest-xdist for distributed test runs, automatically unifying traces across multiple processes or hosts, and can nest test runs under a parent trace via the --trace-parent argument.

Use it for

  • Identify which tests or fixtures are slowest in a large test suite to prioritize optimization efforts.
  • Visualize integration test execution against a staging environment using Jaeger to debug failures faster.
  • Connect test traces to application traces when testing OpenTelemetry-instrumented services to see end-to-end behavior.
  • Debug local test performance issues by running pytest-opentelemetry locally and inspecting traces in Jaeger.
  • Track test suite runtime trends over time by exporting traces to a persistent backend for historical analysis.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you already use or plan to adopt OpenTelemetry for observability and want detailed visibility into test performance.

The plugin is actively maintained, has no known vulnerabilities, and integrates cleanly with pytest. Install it if you need to profile test bottlenecks or correlate test execution with application traces; skip it if you have no observability infrastructure or don't need test-level tracing.

Install

pytest-opentelemetry on PyPI

Before you install

Low friction installation as a pure Python wheel. Actively maintained with a recent release (2025-04-25) and ongoing commits; last commit 2026-07-26. Depends on five runtime packages including opentelemetry-sdk and pytest itself, all standard in the ecosystem.

Requires an OpenTelemetry Collector or compatible OTLP gRPC endpoint running (default http://localhost:4317); only OTLP over gRPC exporter is currently supported.

License in practice

MIT license (permissive) means you can use, modify, and distribute this plugin freely in commercial and private projects with minimal restrictions.

Quickstart

pip install pytest-opentelemetry

pytest --export-traces

# With custom collector endpoint:
export OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317
pytest --export-traces

Verify before relying

  • Whether pytest-xdist integration works with all versions of pytest-xdist or has known incompatibilities.
  • Performance overhead of instrumentation on test suite runtime when traces are exported.
  • Support for other OpenTelemetry exporters beyond OTLP gRPC in future versions.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
opentelemetry-apiopentelemetry-container-distroopentelemetry-sdkopentelemetry-semantic-conventionspytest
MaintenanceActively maintained 476 days since the last release
Last repo commit
First released
Downloads1,205,304 / month, #4,225 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Framework :: PytestLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Evidence: pytest_opentelemetry-1.1.0-py3-none-any.whl

Tags

Capabilities
pytest opentelemetry instrumentationtest suite tracing and monitoringpytest performance profilingopentelemetry pytest plugintest execution span exportpytest jaeger integrationdistributed test tracing
Topics
observabilityperformance-profilingdistributed-tracing

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pytest opentelemetry instrumentation”

Give your agent the search over MCP, or paste the wish link into any chat.

More Testing packages

pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo
virtualenv Worth it
PyPI · Libraries · released Aug 2026

virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.

MITpure Python · 3.9+
532.9Mdownloads / mo
coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
pytest-asyncio Worth it
PyPI · Testing · released May 2026

pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.

Install it if you write tests for any asyncio-based code.

Apache-2.0pure Python · 3.10+
275.9Mdownloads / mo
pytest-json-ctrf Worth it
PyPI · Testing · released Jul 2026

A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.

Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.

MITpure Python · 3.8+
273.0Mdownloads / mo

See also buildkite-test-collector · pytest-otel · opentelemetry-exporter-jaeger · opentelemetry-exporter-jaeger-proto-grpc · azure-monitor-opentelemetry-exporter · opentelemetry-instrumentation · opentelemetry-exporter-jaeger-thrift · opentelemetry-test-utils · opentelemetry-instrumentation-jinja2 · opentelemetry-instrumentation-wsgi