opentelemetry-instrumentation-flask
Flask instrumentation for OpenTelemetry
Decision gist · record as of 2026-08-14
Yes, if you are already using OpenTelemetry in a Flask application and need automatic HTTP request tracing. The package is actively maintained, has low install friction, carries a permissive license, and has no known vulnerabilities. Install only if you have a tracer provider and exporter already configured; the package itself does not export spans.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; requires a configured OpenTelemetry tracer provider to export spans.
- Low friction install with a small, stable dependency tree.
- Actively maintained as of 2026-08-13 with recent releases; part of the OpenTelemetry ecosystem and positioned for modern Python versions (3.10+).
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in most projects, including commercial ones, with minimal restrictions beyond attribution.
last release 2026-07-16 (29 days) · last repo commit 2026-08-13 · 1,086 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 46,428,750 downloads/mo, #609 on PyPI
Alternatives
Verify before relying
pip install opentelemetry-instrumentation-flask
from opentelemetry.instrumentation.flask import FlaskInstrumentor
from flask import Flask
app = Flask(__name__)
FlaskInstrumentor().instrument_app(app)- Whether the package handles async Flask views or only synchronous request handlers.
- What specific WSGI middleware behaviors are inherited from opentelemetry-instrumentation-wsgi.
- Whether span attributes follow OpenTelemetry semantic conventions for HTTP (opentelemetry-semantic-conventions dependency).
What it is and what it does
This package instruments Flask applications to emit OpenTelemetry spans for every HTTP request and response. It builds on top of the WSGI middleware layer provided by opentelemetry-instrumentation-wsgi, adding Flask-specific context and span attributes. When installed and initialized in a Flask app, it automatically creates traces that capture request metadata, response status, and timing information—useful for distributed tracing across microservices or for local observability.
The package requires a working OpenTelemetry tracer provider and exporter to be configured separately; it only generates the instrumentation hooks. It depends on opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, opentelemetry-util-http, and packaging. It is actively maintained and supports Python 3.10 through 3.14.
Use it for
- Trace HTTP requests across a distributed Flask microservice architecture to diagnose latency and failures.
- Export Flask request spans to a backend like Jaeger or Datadog for centralized observability.
- Correlate Flask request traces with downstream service calls to understand end-to-end request flow.
- Monitor Flask application performance by collecting request duration and status code distributions.
- Debug Flask request handling by inspecting automatically generated span attributes and timing.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are already using OpenTelemetry in a Flask application and need automatic HTTP request tracing.
The package is actively maintained, has low install friction, carries a permissive license, and has no known vulnerabilities. Install only if you have a tracer provider and exporter already configured; the package itself does not export spans.
Install
opentelemetry-instrumentation-flask on PyPI
Before you install
Low friction install with a small, stable dependency tree. Actively maintained as of 2026-08-13 with recent releases; part of the OpenTelemetry ecosystem and positioned for modern Python versions (3.10+).
Requires Python 3.10 or later; requires a configured OpenTelemetry tracer provider to export spans.
License in practice
Apache-2.0 permissive license allows use in most projects, including commercial ones, with minimal restrictions beyond attribution.
Quickstart
pip install opentelemetry-instrumentation-flask
from opentelemetry.instrumentation.flask import FlaskInstrumentor
from flask import Flask
app = Flask(__name__)
FlaskInstrumentor().instrument_app(app)
Verify before relying
- Whether the package handles async Flask views or only synchronous request handlers.
- What specific WSGI middleware behaviors are inherited from opentelemetry-instrumentation-wsgi.
- Whether span attributes follow OpenTelemetry semantic conventions for HTTP (opentelemetry-semantic-conventions dependency).
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesopentelemetry-apiopentelemetry-instrumentation-wsgiopentelemetry-instrumentationopentelemetry-semantic-conventionsopentelemetry-util-httppackaging |
| Maintenance | Actively maintained 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 46,428,750 / month, #609 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: opentelemetry_instrumentation_flask-0.65b0-py3-none-any.whl
Tags
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 › “opentelemetry flask instrumentation”
- opentelemetry-instrumentation-flaskAdds distributed tracing to Flask web applications by instrumenting…
- opentelemetry-instrumentation-wsgiProvides WSGI middleware for OpenTelemetry that automatically…
- aws-opentelemetry-distroProvides AWS-integrated OpenTelemetry auto-instrumentation for Python…
Give your agent the search over MCP, or paste the wish link into any chat.
More Monitoring packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.
Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.
Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.
Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.
Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.
Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.
Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.
Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.
See also opentelemetry-instrumentation-django · opentelemetry-instrumentation-falcon · opentelemetry-instrumentation-pyramid · opentelemetry-instrumentation-tornado · opentelemetry-instrumentation-wsgi · instana · opentelemetry-instrumentation-asgi · opencensus-ext-flask · opentelemetry-instrumentation-sqlalchemy · opentelemetry-instrumentation-redis