opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentati...
Leighton Chen d38463ad70 Use url.rule instead of request.endpoint for span name flask instrumentation (#1260) 2020-10-21 10:08:33 -07:00
..
src/opentelemetry/instrumentation/flask Use url.rule instead of request.endpoint for span name flask instrumentation (#1260) 2020-10-21 10:08:33 -07:00
tests Use url.rule instead of request.endpoint for span name flask instrumentation (#1260) 2020-10-21 10:08:33 -07:00
CHANGELOG.md Use url.rule instead of request.endpoint for span name flask instrumentation (#1260) 2020-10-21 10:08:33 -07:00
LICENSE Rename web framework packages from "ext" to "instrumentation" (#961) 2020-08-03 10:10:45 -07:00
MANIFEST.in Rename web framework packages from "ext" to "instrumentation" (#961) 2020-08-03 10:10:45 -07:00
README.rst Rename web framework packages from "ext" to "instrumentation" (#961) 2020-08-03 10:10:45 -07:00
setup.cfg chore: bump dev version (#1235) 2020-10-13 11:38:09 -07:00
setup.py Rename web framework packages from "ext" to "instrumentation" (#961) 2020-08-03 10:10:45 -07:00

README.rst

OpenTelemetry Flask Tracing
===========================

|pypi|

.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-flask.svg
   :target: https://pypi.org/project/opentelemetry-instrumentation-flask/

This library builds on the OpenTelemetry WSGI middleware to track web requests
in Flask applications.

Installation
------------

::

    pip install opentelemetry-instrumentation-flask

Configuration
-------------

Exclude lists
*************
To exclude certain URLs from being tracked, set the environment variable ``OTEL_PYTHON_FLASK_EXCLUDED_URLS`` with comma delimited regexes representing which URLs to exclude.

For example,

::

    export OTEL_PYTHON_FLASK_EXCLUDED_URLS="client/.*/info,healthcheck"

will exclude requests such as ``https://site/client/123/info`` and ``https://site/xyz/healthcheck``.

References
----------

* `OpenTelemetry Flask Instrumentation <https://opentelemetry-python.readthedocs.io/en/latest/instrumentation/flask/flask.html>`_
* `OpenTelemetry Project <https://opentelemetry.io/>`_