Skip to content

Commit 926d0bb

Browse files
committed
aiohttp-server: document OTEL_PYTHON_EXCLUDED_URLS configuration
1 parent ec2ff1d commit 926d0bb

File tree

1 file changed

+19
-0
lines changed
  • instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server

1 file changed

+19
-0
lines changed

instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,25 @@ async def hello(request):
3535
app.add_routes([web.get('/', hello)])
3636
3737
web.run_app(app)
38+
39+
40+
Configuration
41+
-------------
42+
43+
Exclude lists
44+
*************
45+
To exclude certain URLs from tracking, set the environment variable ``OTEL_PYTHON_AIOHTTP_SERVER_EXCLUDED_URLS``
46+
(or ``OTEL_PYTHON_EXCLUDED_URLS`` to cover all instrumentations) to a string of comma delimited regexes that match the
47+
URLs.
48+
49+
For example,
50+
51+
::
52+
53+
export OTEL_PYTHON_AIOHTTP_SERVER_EXCLUDED_URLS="client/.*/info,healthcheck"
54+
55+
will exclude requests such as ``https://site/client/123/info`` and ``https://site/xyz/healthcheck``.
56+
3857
"""
3958

4059
import urllib

0 commit comments

Comments
 (0)