Skip to content

Commit 743c0e7

Browse files
fix: PAAL-206 add excluded urls env var to starlette app
1 parent 072e1c6 commit 743c0e7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

adk/agenticlayer/agent_to_a2a.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"""
55

66
import logging
7+
import os
78

89
from a2a.server.apps import A2AStarletteApplication
910
from a2a.server.request_handlers import DefaultRequestHandler
@@ -106,6 +107,8 @@ async def create_runner() -> Runner:
106107
)
107108

108109
# Instrument the Starlette app with OpenTelemetry
110+
## Set env var to remove health check logging, needs to be set immediately before starlette intstrumentation
111+
os.environ.setdefault("OTEL_PYTHON_STARLETTE_EXCLUDED_URLS", AGENT_CARD_WELL_KNOWN_PATH)
109112
StarletteInstrumentor().instrument_app(starlette_app)
110113

111114
return starlette_app

0 commit comments

Comments
 (0)