opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentati...
Leighton Chen ad1ef6e920 changelog + version 2021-10-12 20:47:14 -07:00
..
src/opentelemetry/instrumentation/falcon changelog + version 2021-10-12 20:47:14 -07:00
tests use f-strings instead of format (#693) 2021-09-28 19:12:47 +00:00
LICENSE Fix error in license files (#521) 2021-05-28 09:16:58 -07:00
MANIFEST.in instrumentation/falcon: Added Falcon 2.0+ instrumentation (#1039) 2020-09-16 09:04:02 -07:00
README.rst Falcon 3 support (#644) 2021-09-27 19:58:13 +00:00
setup.cfg changelog + version 2021-10-12 20:47:14 -07:00
setup.py update open calls to pass encoding (#684) 2021-09-22 10:16:14 -07:00

README.rst

OpenTelemetry Falcon Tracing
============================

|pypi|

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

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

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

::

    pip install opentelemetry-instrumentation-falcon

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

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

For example,

::

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

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

Request attributes
********************
To extract certain attributes from Falcon's request object and use them as span attributes, set the environment variable ``OTEL_PYTHON_FALCON_TRACED_REQUEST_ATTRS`` to a comma
delimited list of request attribute names. 

For example,

::

    export OTEL_PYTHON_FALCON_TRACED_REQUEST_ATTRS='query_string,uri_template'

will extract path_info and content_type attributes from every traced request and add them as span attritbues.

Falcon Request object reference: https://falcon.readthedocs.io/en/stable/api/request_and_response.html#id1

References
----------

* `OpenTelemetry Falcon Instrumentation <https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/falcon/falcon.html>`_
* `OpenTelemetry Project <https://opentelemetry.io/>`_
* `OpenTelemetry Python Examples <https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples>`_