Skip to main content

Flask tracing for OpenTelemetry (based on opentelemetry-ext-wsgi)

Project description

This library builds on the OpenTelemetry WSGI middleware to track web requests in Flask applications. In addition to opentelemetry-ext-wsgi, it supports flask-specific features such as:

  • The Flask endpoint name is used as the Span name.
  • The http.route Span attribute is set so that one can see which URL rule matched a request.


from flask import Flask
from opentelemetry.ext.flask import instrument_app

app = Flask(__name__)
instrument_app(app)  # This is where the magic happens. ✨

def hello():
    return "Hello!"

if __name__ == "__main__":

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for opentelemetry-ext-flask, version 0.3a0
Filename, size File type Python version Upload date Hashes
Filename, size opentelemetry_ext_flask-0.3a0-py3-none-any.whl (3.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page