opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentati...
Mario Jonke d53e00a042 Make SpanProcessor.on_start accept parent Context (#1251)
* context from Tracer.start_span is passed through to the SpanProcessor
* fix linting issue in falcon test app when linting with eachdist script
* fix global error handler test as it read installed extensions
* reset global Configuration object state after tests were run
2020-10-22 21:14:15 -07:00
..
src/opentelemetry/instrumentation/falcon Use is_recording flag in jinja, celery, esearch, falcon instrumentations (#1241) 2020-10-22 21:14:15 -07:00
tests Make SpanProcessor.on_start accept parent Context (#1251) 2020-10-22 21:14:15 -07:00
CHANGELOG.md chore: bump dev version (#1235) 2020-10-22 21:14:15 -07:00
LICENSE instrumentation/falcon: Added Falcon 2.0+ instrumentation (#1039) 2020-10-22 21:14:15 -07:00
MANIFEST.in instrumentation/falcon: Added Falcon 2.0+ instrumentation (#1039) 2020-10-22 21:14:15 -07:00
README.rst Added ability to extract span attributes from falcon request objects. (#1158) 2020-10-22 21:14:15 -07:00
setup.cfg chore: bump dev version (#1235) 2020-10-22 21:14:15 -07:00
setup.py instrumentation/falcon: Added Falcon 2.0+ instrumentation (#1039) 2020-10-22 21:14:15 -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.readthedocs.io/en/latest/instrumentation/falcon/falcon.html>`_
* `OpenTelemetry Project <https://opentelemetry.io/>`_