Skip to content

Commit a02f321

Browse files
jawoszekcopybara-github
authored andcommitted
chore(otel): Change default of trace_to_cloud to None for Agent Engine deploy
Also added --no-trace_to_cloud to allow for explicit disablement. This is needed to distinguish between default-on telemetry and explicit disablement via old enable_tracing/trace_to_cloud flags. Same change was done to ADK templates - see https://github.com/googleapis/python-aiplatform/pull/5917/files#diff-54084046c0ff3ec289916eefbb00d04f797ebd02dc15b417fc4fc88137fd2123R439. Co-authored-by: Kacper Jawoszek <jawoszek@google.com> PiperOrigin-RevId: 827552868
1 parent 308da62 commit a02f321

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/google/adk/cli/cli_deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def to_agent_engine(
345345
temp_folder: str,
346346
adk_app: str,
347347
staging_bucket: str,
348-
trace_to_cloud: bool,
348+
trace_to_cloud: Optional[bool] = None,
349349
agent_engine_id: Optional[str] = None,
350350
absolutize_imports: bool = True,
351351
project: Optional[str] = None,

src/google/adk/cli/cli_tools_click.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,11 +1495,11 @@ def cli_deploy_cloud_run(
14951495
),
14961496
)
14971497
@click.option(
1498-
"--trace_to_cloud",
1498+
"--trace_to_cloud/--no-trace_to_cloud",
14991499
type=bool,
15001500
is_flag=True,
15011501
show_default=True,
1502-
default=False,
1502+
default=None,
15031503
help="Optional. Whether to enable Cloud Trace for Agent Engine.",
15041504
)
15051505
@click.option(
@@ -1591,7 +1591,7 @@ def cli_deploy_agent_engine(
15911591
region: str,
15921592
staging_bucket: str,
15931593
agent_engine_id: Optional[str],
1594-
trace_to_cloud: bool,
1594+
trace_to_cloud: Optional[bool],
15951595
display_name: str,
15961596
description: str,
15971597
adk_app: str,

0 commit comments

Comments
 (0)