Skip to content

feat(telemetry): emit entrypoint invoke_workflow span under schema v2#6252

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
copybara/939850650
Open

feat(telemetry): emit entrypoint invoke_workflow span under schema v2#6252
copybara-service[bot] wants to merge 1 commit into
mainfrom
copybara/939850650

Conversation

@copybara-service

Copy link
Copy Markdown

feat(telemetry): emit entrypoint invoke_workflow span under schema v2

When ADK_TELEMETRY_SCHEMA_VERSION_OPT_IN resolves to 2, replace the legacy
top-level 'invocation' span with an entrypoint 'invoke_workflow {entrypoint}'
span (entrypoint = root agent or root node name), set is_entrypoint, and emit
the gen_ai.invoke_workflow.duration metric alongside it. Entrypoint status is
tracked via a contextvar so nested/agent-as-tool workflows report
is_entrypoint=false and the span is not double-emitted when the ADK entrypoint
is itself a workflow. Schema v1 is unchanged.

Co-authored-by: Max Ind maxind@google.com

When ADK_TELEMETRY_SCHEMA_VERSION_OPT_IN resolves to 2, replace the legacy
top-level 'invocation' span with an entrypoint 'invoke_workflow {entrypoint}'
span (entrypoint = root agent or root node name), set is_entrypoint, and emit
the gen_ai.invoke_workflow.duration metric alongside it. Entrypoint status is
tracked via a contextvar so nested/agent-as-tool workflows report
is_entrypoint=false and the span is not double-emitted when the ADK entrypoint
is itself a workflow. Schema v1 is unchanged.

Co-authored-by: Max Ind <maxind@google.com>
PiperOrigin-RevId: 939850650
@copybara-service copybara-service Bot force-pushed the copybara/939850650 branch from 426e2aa to 628221c Compare July 1, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant