Skip to content

Commit 1e4b5e5

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

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

adk/agenticlayer/agent_to_a2a.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
"""
55

66
import logging
7+
import os
8+
9+
from a2a.utils.constants import AGENT_CARD_WELL_KNOWN_PATH
10+
11+
# Needs to be set here since _excluded_urls is initialized at module import time
12+
os.environ.setdefault("OTEL_PYTHON_STARLETTE_EXCLUDED_URLS", AGENT_CARD_WELL_KNOWN_PATH)
713

814
from a2a.server.apps import A2AStarletteApplication
915
from a2a.server.request_handlers import DefaultRequestHandler
1016
from a2a.server.tasks import InMemoryTaskStore
1117
from a2a.types import AgentCapabilities, AgentCard
12-
from a2a.utils.constants import AGENT_CARD_WELL_KNOWN_PATH
1318
from google.adk.a2a.executor.a2a_agent_executor import A2aAgentExecutor
1419
from google.adk.agents.base_agent import BaseAgent
1520
from google.adk.apps.app import App

0 commit comments

Comments
 (0)