From 5524d55a1200585790282de6de4229435c213155 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Mon, 13 Oct 2025 14:30:11 +0200 Subject: [PATCH 1/2] tornado: cite the instrumentation also handles OTEL_PYTHON_EXCLUDED_URLS --- .../src/opentelemetry/instrumentation/tornado/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py index bdccb33edb..bfde789681 100644 --- a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py @@ -39,7 +39,7 @@ def get(self): The following environment variables are supported as configuration options: -- OTEL_PYTHON_TORNADO_EXCLUDED_URLS +- OTEL_PYTHON_TORNADO_EXCLUDED_URLS (or ``OTEL_PYTHON_EXCLUDED_URLS`` to cover all instrumentations) A comma separated list of paths that should not be automatically traced. For example, if this is set to From 48fe1b20c25101d5bb6ee983ae98e9517b2f527b Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Mon, 13 Oct 2025 14:30:55 +0200 Subject: [PATCH 2/2] aiohttp-server: document OTEL_PYTHON_EXCLUDED_URLS configuration --- .../aiohttp_server/__init__.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py b/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py index 1074298fc7..f138453947 100644 --- a/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py @@ -35,6 +35,25 @@ async def hello(request): app.add_routes([web.get('/', hello)]) web.run_app(app) + + +Configuration +------------- + +Exclude lists +************* +To exclude certain URLs from tracking, set the environment variable ``OTEL_PYTHON_AIOHTTP_SERVER_EXCLUDED_URLS`` +(or ``OTEL_PYTHON_EXCLUDED_URLS`` to cover all instrumentations) to a string of comma delimited regexes that match the +URLs. + +For example, + +:: + + export OTEL_PYTHON_AIOHTTP_SERVER_EXCLUDED_URLS="client/.*/info,healthcheck" + +will exclude requests such as ``https://site/client/123/info`` and ``https://site/xyz/healthcheck``. + """ import urllib