Skip to content

Commit f8fccfe

Browse files
yeesiancopybara-github
authored andcommitted
feat: Add --trigger_sources and --artifact_service_uri to cli_deploy_agent_engine
Co-authored-by: Yeesian Ng <ysian@google.com> PiperOrigin-RevId: 899594873
1 parent 33cf6cb commit f8fccfe

9 files changed

Lines changed: 1051 additions & 385 deletions

File tree

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ optional-dependencies.extensions = [
131131
"pypika>=0.50", # For crewai->chromadb dependency
132132
"toolbox-adk>=1,<2", # For tools.toolbox_toolset.ToolboxToolset
133133
]
134-
optional-dependencies.otel-gcp = [ "opentelemetry-instrumentation-google-genai>=0.6b0,<1" ]
134+
optional-dependencies.otel-gcp = [
135+
"opentelemetry-instrumentation-google-genai>=0.6b0,<1",
136+
"opentelemetry-instrumentation-grpc>=0.43b0,<1",
137+
"opentelemetry-instrumentation-httpx>=0.54b0,<1",
138+
]
135139
optional-dependencies.slack = [ "slack-bolt>=1.22" ]
136140
optional-dependencies.test = [
137141
"a2a-sdk>=0.3,<0.4",

src/google/adk/cli/adk_web_server.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,29 @@ def _setup_instrumentation_lib_if_installed():
600600
from opentelemetry.instrumentation.google_genai import GoogleGenAiSdkInstrumentor
601601

602602
GoogleGenAiSdkInstrumentor().instrument()
603-
except ImportError:
603+
except (ImportError, AttributeError):
604604
logger.warning(
605605
"Unable to import GoogleGenAiSdkInstrumentor - some"
606606
" telemetry will be disabled. Make sure to install google-adk[otel-gcp]"
607607
)
608+
try:
609+
from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor
610+
611+
HTTPXClientInstrumentor().instrument()
612+
except (ImportError, AttributeError):
613+
logger.warning(
614+
"telemetry enabled but proceeding without HTTPX instrumentation,"
615+
" because google-adk[otel-gcp] has not been installed"
616+
)
617+
try:
618+
from opentelemetry.instrumentation.grpc import GrpcInstrumentorClient
619+
620+
GrpcInstrumentorClient().instrument()
621+
except (ImportError, AttributeError):
622+
logger.warning(
623+
"telemetry enabled but proceeding without gRPC instrumentation,"
624+
" because google-adk[otel-gcp] has not been installed"
625+
)
608626

609627

610628
class AdkWebServer:

0 commit comments

Comments
 (0)