diff --git a/src/google/adk/telemetry/_instrumentation.py b/src/google/adk/telemetry/_instrumentation.py index 8b94cb5f..2c8366ba 100644 --- a/src/google/adk/telemetry/_instrumentation.py +++ b/src/google/adk/telemetry/_instrumentation.py @@ -132,6 +132,7 @@ class TelemetryContext: span: tracing.GenerateContentSpan | trace.Span | None = None skill_telemetry: SkillTelemetry | None = None _llm_responses: list[LlmResponse] = dataclasses.field(default_factory=list) + _inference_span_ended: bool = False _inference_call_count: int = 0 _tool_call_count: int = 0 @@ -157,7 +158,21 @@ class TelemetryContext: self, invocation_context: InvocationContext, response: LlmResponse ) -> None: self._llm_responses.append(response) + # Anything after the span ended (a second complete response for the same + # call) can no longer be recorded on it, but still counts for the metrics. + if self._inference_span_ended: + return + tracing.trace_inference_result(invocation_context, self.span, response) + # A non-partial response is the end of the inference: end the span before + # the response is handed back to the caller, so what the caller does with + # it (running the tool the model asked for) is not nested inside the + # inference span. Partial chunks keep it open until the final one arrives. + if not response.partial and isinstance( + self.span, tracing.GenerateContentSpan + ): + self.span._close() # pylint: disable=protected-access + self._inference_span_ended = True def _record_agent_metrics( diff --git a/src/google/adk/telemetry/tracing.py b/src/google/adk/telemetry/tracing.py index f1586e1f..def495a1 100644 --- a/src/google/adk/telemetry/tracing.py +++ b/src/google/adk/telemetry/tracing.py @@ -24,10 +24,12 @@ from __future__ import annotations from collections.abc import AsyncIterator +from collections.abc import Callable from collections.abc import Iterator from collections.abc import Mapping from contextlib import asynccontextmanager from contextlib import contextmanager +from contextlib import ExitStack import logging import re from typing import Final @@ -702,12 +704,19 @@ async def use_inference_span( if invocation_context.session.user_id is not None: log_only_common_attributes[USER_ID] = invocation_context.session.user_id if _should_emit_native_telemetry(invocation_context.agent): - async with _use_native_generate_content_span( - llm_request=llm_request, - common_attributes=common_attributes, - log_only_common_attributes=log_only_common_attributes, - telemetry_config=telemetry_config, - ) as gc_span: + # Unwound through an ExitStack rather than a nested `with`, so that + # `GenerateContentSpan.end()` can close the span (and emit its completion + # details) as soon as the inference is done, instead of when the caller is + # done with the response. + with ExitStack() as stack: + gc_span = stack.enter_context( + _use_native_generate_content_span( + llm_request=llm_request, + common_attributes=common_attributes, + log_only_common_attributes=log_only_common_attributes, + telemetry_config=telemetry_config, + ) + ) if telemetry_config.should_use_experimental_genai_semconv: set_operation_details_common_attributes( gc_span.operation_details_common_attributes, @@ -715,16 +724,20 @@ async def use_inference_span( common_attributes, log_only_attributes=log_only_common_attributes, ) - try: - yield gc_span - finally: - maybe_log_completion_details( - gc_span.span, - otel_logger, - gc_span.operation_details_attributes, - gc_span.operation_details_common_attributes, - telemetry_config, - ) + # Registered last, so it unwinds first: while the span is still open. + stack.callback( + lambda: maybe_log_completion_details( + gc_span.span, + otel_logger, + gc_span.operation_details_attributes, + gc_span.operation_details_common_attributes, + telemetry_config, + ) + ) + # `ExitStack.close()` empties the stack, so calling it again (here on + # exit, after `_end()` already did) is a no-op. + gc_span._close = stack.close # pyright: ignore[reportPrivateUsage] + yield gc_span else: with _use_extra_generate_content_attributes( common_attributes, @@ -857,13 +870,13 @@ def _use_native_generate_content_span_stable_semconv( yield gc_span -@asynccontextmanager -async def _use_native_generate_content_span( +@contextmanager +def _use_native_generate_content_span( llm_request: LlmRequest, common_attributes: Mapping[str, AttributeValue], telemetry_config: TelemetryConfig, log_only_common_attributes: Mapping[str, AttributeValue] | None = None, -) -> AsyncIterator[GenerateContentSpan]: +) -> Iterator[GenerateContentSpan]: if not telemetry_config.should_use_experimental_genai_semconv: with _use_native_generate_content_span_stable_semconv( llm_request, @@ -899,6 +912,13 @@ class GenerateContentSpan: self.span: Final = span self.operation_details_attributes: dict[str, AttributeValue] = {} self.operation_details_common_attributes: dict[str, AttributeValue] = {} + # Ends the span, idempotently, without waiting for `use_inference_span` to + # exit. Installed by span, which owns it. Calling it as soon as the + # inference is done keeps what the caller then does with the response + # (running the tool it asked for) out of the span, like + # opentelemetry-instrumentation-google-genai, whose span ends when the SDK + # call returns. + self._close: Callable[[], None] = lambda: None @deprecated( diff --git a/tests/unittests/telemetry/functional_goldens/agent/experimental-event-only-schema-v1.json b/tests/unittests/telemetry/functional_goldens/agent/experimental-event-only-schema-v1.json index 0aa40fb0..b4778b6b 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/experimental-event-only-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/agent/experimental-event-only-schema-v1.json @@ -34,6 +34,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -59,27 +78,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/agent/experimental-event-only-schema-v2.json b/tests/unittests/telemetry/functional_goldens/agent/experimental-event-only-schema-v2.json index 80138f2a..aefc66dc 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/experimental-event-only-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/agent/experimental-event-only-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -63,27 +82,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/agent/experimental-no-content-schema-v1.json b/tests/unittests/telemetry/functional_goldens/agent/experimental-no-content-schema-v1.json index da4ad0c4..b65b6f93 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/experimental-no-content-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/agent/experimental-no-content-schema-v1.json @@ -34,6 +34,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -59,27 +78,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/agent/experimental-no-content-schema-v2.json b/tests/unittests/telemetry/functional_goldens/agent/experimental-no-content-schema-v2.json index 71219b33..d0e10c7d 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/experimental-no-content-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/agent/experimental-no-content-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -63,27 +82,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/agent/experimental-span-and-event-schema-v1.json b/tests/unittests/telemetry/functional_goldens/agent/experimental-span-and-event-schema-v1.json index f07d8c6c..cbb5d281 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/experimental-span-and-event-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/agent/experimental-span-and-event-schema-v1.json @@ -34,6 +34,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -105,27 +124,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/agent/experimental-span-and-event-schema-v2.json b/tests/unittests/telemetry/functional_goldens/agent/experimental-span-and-event-schema-v2.json index 832c15e7..4f172a09 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/experimental-span-and-event-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/agent/experimental-span-and-event-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -109,27 +128,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/agent/experimental-span-only-schema-v1.json b/tests/unittests/telemetry/functional_goldens/agent/experimental-span-only-schema-v1.json index 33a34ae9..7fd83038 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/experimental-span-only-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/agent/experimental-span-only-schema-v1.json @@ -34,6 +34,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -105,27 +124,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/agent/experimental-span-only-schema-v2.json b/tests/unittests/telemetry/functional_goldens/agent/experimental-span-only-schema-v2.json index 39537a41..5a8272f7 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/experimental-span-only-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/agent/experimental-span-only-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -109,27 +128,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/agent/stable-capture-schema-v1.json b/tests/unittests/telemetry/functional_goldens/agent/stable-capture-schema-v1.json index 2a8b088f..b016cf2a 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/stable-capture-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/agent/stable-capture-schema-v1.json @@ -34,6 +34,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -53,27 +72,7 @@ "gen_ai.usage.reasoning.output_tokens": 5 }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/agent/stable-capture-schema-v2.json b/tests/unittests/telemetry/functional_goldens/agent/stable-capture-schema-v2.json index 6b432f26..726f386c 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/stable-capture-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/agent/stable-capture-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -57,27 +76,7 @@ "gen_ai.usage.reasoning.output_tokens": 5 }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/agent/stable-no-capture-schema-v1.json b/tests/unittests/telemetry/functional_goldens/agent/stable-no-capture-schema-v1.json index ca6fc06a..4e0220da 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/stable-no-capture-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/agent/stable-no-capture-schema-v1.json @@ -34,6 +34,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -53,27 +72,7 @@ "gen_ai.usage.reasoning.output_tokens": 5 }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/agent/stable-no-capture-schema-v2.json b/tests/unittests/telemetry/functional_goldens/agent/stable-no-capture-schema-v2.json index 6eec5692..5ec005d3 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/stable-no-capture-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/agent/stable-no-capture-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -57,27 +76,7 @@ "gen_ai.usage.reasoning.output_tokens": 5 }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/agent/tool-error-valueerror-schema-v2.json b/tests/unittests/telemetry/functional_goldens/agent/tool-error-valueerror-schema-v2.json index 773dc697..2743c39a 100644 --- a/tests/unittests/telemetry/functional_goldens/agent/tool-error-valueerror-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/agent/tool-error-valueerror-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "error.type": "ValueError", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "ERROR", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -57,27 +76,7 @@ "gen_ai.usage.reasoning.output_tokens": 5 }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "error.type": "ValueError", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "ERROR", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/node/experimental-event-only-schema-v1.json b/tests/unittests/telemetry/functional_goldens/node/experimental-event-only-schema-v1.json index 07469bad..404d840b 100644 --- a/tests/unittests/telemetry/functional_goldens/node/experimental-event-only-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/node/experimental-event-only-schema-v1.json @@ -43,6 +43,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -68,27 +87,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/node/experimental-event-only-schema-v2.json b/tests/unittests/telemetry/functional_goldens/node/experimental-event-only-schema-v2.json index 8aeb15a9..9ff2fb73 100644 --- a/tests/unittests/telemetry/functional_goldens/node/experimental-event-only-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/node/experimental-event-only-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -63,27 +82,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/node/experimental-no-content-schema-v1.json b/tests/unittests/telemetry/functional_goldens/node/experimental-no-content-schema-v1.json index 88379c7e..b4c9b752 100644 --- a/tests/unittests/telemetry/functional_goldens/node/experimental-no-content-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/node/experimental-no-content-schema-v1.json @@ -43,6 +43,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -68,27 +87,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/node/experimental-no-content-schema-v2.json b/tests/unittests/telemetry/functional_goldens/node/experimental-no-content-schema-v2.json index 9ef6436d..7de5aa91 100644 --- a/tests/unittests/telemetry/functional_goldens/node/experimental-no-content-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/node/experimental-no-content-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -63,27 +82,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/node/experimental-span-and-event-schema-v1.json b/tests/unittests/telemetry/functional_goldens/node/experimental-span-and-event-schema-v1.json index 93097252..7394eefa 100644 --- a/tests/unittests/telemetry/functional_goldens/node/experimental-span-and-event-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/node/experimental-span-and-event-schema-v1.json @@ -43,6 +43,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -114,27 +133,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/node/experimental-span-and-event-schema-v2.json b/tests/unittests/telemetry/functional_goldens/node/experimental-span-and-event-schema-v2.json index 02599e25..2f76ff30 100644 --- a/tests/unittests/telemetry/functional_goldens/node/experimental-span-and-event-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/node/experimental-span-and-event-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -109,27 +128,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/node/experimental-span-only-schema-v1.json b/tests/unittests/telemetry/functional_goldens/node/experimental-span-only-schema-v1.json index 22103584..0edcf3bc 100644 --- a/tests/unittests/telemetry/functional_goldens/node/experimental-span-only-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/node/experimental-span-only-schema-v1.json @@ -43,6 +43,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -114,27 +133,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/node/experimental-span-only-schema-v2.json b/tests/unittests/telemetry/functional_goldens/node/experimental-span-only-schema-v2.json index 172d8b35..daa71d6e 100644 --- a/tests/unittests/telemetry/functional_goldens/node/experimental-span-only-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/node/experimental-span-only-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -109,27 +128,7 @@ ] }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.client.inference.operation.details", diff --git a/tests/unittests/telemetry/functional_goldens/node/stable-capture-schema-v1.json b/tests/unittests/telemetry/functional_goldens/node/stable-capture-schema-v1.json index 8ff9741f..4d34f444 100644 --- a/tests/unittests/telemetry/functional_goldens/node/stable-capture-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/node/stable-capture-schema-v1.json @@ -43,6 +43,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -62,27 +81,7 @@ "gen_ai.usage.reasoning.output_tokens": 5 }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/node/stable-capture-schema-v2.json b/tests/unittests/telemetry/functional_goldens/node/stable-capture-schema-v2.json index 271366e6..d755e952 100644 --- a/tests/unittests/telemetry/functional_goldens/node/stable-capture-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/node/stable-capture-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -57,27 +76,7 @@ "gen_ai.usage.reasoning.output_tokens": 5 }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/node/stable-no-capture-schema-v1.json b/tests/unittests/telemetry/functional_goldens/node/stable-no-capture-schema-v1.json index a09b17fc..55e73b50 100644 --- a/tests/unittests/telemetry/functional_goldens/node/stable-no-capture-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/node/stable-no-capture-schema-v1.json @@ -43,6 +43,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -62,27 +81,7 @@ "gen_ai.usage.reasoning.output_tokens": 5 }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/node/stable-no-capture-schema-v2.json b/tests/unittests/telemetry/functional_goldens/node/stable-no-capture-schema-v2.json index 696cc0f6..6f1995ea 100644 --- a/tests/unittests/telemetry/functional_goldens/node/stable-no-capture-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/node/stable-no-capture-schema-v2.json @@ -38,6 +38,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool some_tool", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "A sample tool.", + "gen_ai.tool.name": "some_tool", + "gen_ai.tool.type": "FunctionTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -57,27 +76,7 @@ "gen_ai.usage.reasoning.output_tokens": 5 }, "status": "UNSET", - "children": [ - { - "name": "execute_tool some_tool", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "A sample tool.", - "gen_ai.tool.name": "some_tool", - "gen_ai.tool.type": "FunctionTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/skill/invalid-skill-schema-v2.json b/tests/unittests/telemetry/functional_goldens/skill/invalid-skill-schema-v2.json index b84cc609..5abb48a0 100644 --- a/tests/unittests/telemetry/functional_goldens/skill/invalid-skill-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/skill/invalid-skill-schema-v2.json @@ -31,6 +31,27 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool load_skill", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", + "gen_ai.tool.name": "load_skill", + "gen_ai.tool.type": "LoadSkillTool", + "gen_ai.agent.name": "some_root_agent", + "error.type": "REGISTRY_ERROR", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}", + "adk.experimental.skill.name": "nonexistent-skill" + }, + "status": "ERROR", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -43,29 +64,7 @@ "gcp.vertex.agent.invocation_id": "PRESENT" }, "status": "UNSET", - "children": [ - { - "name": "execute_tool load_skill", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", - "gen_ai.tool.name": "load_skill", - "gen_ai.tool.type": "LoadSkillTool", - "gen_ai.agent.name": "some_root_agent", - "error.type": "REGISTRY_ERROR", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}", - "adk.experimental.skill.name": "nonexistent-skill" - }, - "status": "ERROR", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/skill/skill-registry-cache-hit-schema-v2.json b/tests/unittests/telemetry/functional_goldens/skill/skill-registry-cache-hit-schema-v2.json index b1a2c2e6..2bec2e58 100644 --- a/tests/unittests/telemetry/functional_goldens/skill/skill-registry-cache-hit-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/skill/skill-registry-cache-hit-schema-v2.json @@ -31,6 +31,30 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool load_skill", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", + "gen_ai.tool.name": "load_skill", + "gen_ai.tool.type": "LoadSkillTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}", + "adk.experimental.skill.name": "registry-skill", + "adk.experimental.skill.description": "A sample skill.", + "adk.experimental.skill.source.uri": "https://fake-registry.com/skill/registry-skill", + "adk.experimental.skill.cache_hit": false, + "adk.experimental.skill.additional_tools": [] + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -43,32 +67,7 @@ "gcp.vertex.agent.invocation_id": "PRESENT" }, "status": "UNSET", - "children": [ - { - "name": "execute_tool load_skill", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", - "gen_ai.tool.name": "load_skill", - "gen_ai.tool.type": "LoadSkillTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}", - "adk.experimental.skill.name": "registry-skill", - "adk.experimental.skill.description": "A sample skill.", - "adk.experimental.skill.source.uri": "https://fake-registry.com/skill/registry-skill", - "adk.experimental.skill.cache_hit": false, - "adk.experimental.skill.additional_tools": [] - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", @@ -116,6 +115,30 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool load_skill", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", + "gen_ai.tool.name": "load_skill", + "gen_ai.tool.type": "LoadSkillTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}", + "adk.experimental.skill.name": "registry-skill", + "adk.experimental.skill.description": "A sample skill.", + "adk.experimental.skill.source.uri": "https://fake-registry.com/skill/registry-skill", + "adk.experimental.skill.cache_hit": true, + "adk.experimental.skill.additional_tools": [] + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -128,32 +151,7 @@ "gcp.vertex.agent.invocation_id": "PRESENT" }, "status": "UNSET", - "children": [ - { - "name": "execute_tool load_skill", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", - "gen_ai.tool.name": "load_skill", - "gen_ai.tool.type": "LoadSkillTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}", - "adk.experimental.skill.name": "registry-skill", - "adk.experimental.skill.description": "A sample skill.", - "adk.experimental.skill.source.uri": "https://fake-registry.com/skill/registry-skill", - "adk.experimental.skill.cache_hit": true, - "adk.experimental.skill.additional_tools": [] - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-disabled-schema-v1.json b/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-disabled-schema-v1.json index 2cd1ed80..05f31df4 100644 --- a/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-disabled-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-disabled-schema-v1.json @@ -27,6 +27,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool load_skill", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", + "gen_ai.tool.name": "load_skill", + "gen_ai.tool.type": "LoadSkillTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -39,27 +58,7 @@ "gcp.vertex.agent.invocation_id": "PRESENT" }, "status": "UNSET", - "children": [ - { - "name": "execute_tool load_skill", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", - "gen_ai.tool.name": "load_skill", - "gen_ai.tool.type": "LoadSkillTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", @@ -107,6 +106,25 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool load_skill", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", + "gen_ai.tool.name": "load_skill", + "gen_ai.tool.type": "LoadSkillTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}" + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -119,27 +137,7 @@ "gcp.vertex.agent.invocation_id": "PRESENT" }, "status": "UNSET", - "children": [ - { - "name": "execute_tool load_skill", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", - "gen_ai.tool.name": "load_skill", - "gen_ai.tool.type": "LoadSkillTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}" - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-schema-v1.json b/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-schema-v1.json index 85714408..92b8d368 100644 --- a/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-schema-v1.json +++ b/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-schema-v1.json @@ -27,6 +27,32 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool load_skill", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", + "gen_ai.tool.name": "load_skill", + "gen_ai.tool.type": "LoadSkillTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}", + "adk.experimental.skill.name": "local-skill", + "adk.experimental.skill.description": "A sample skill.", + "adk.experimental.skill.source.uri": "file://local-skill", + "adk.experimental.skill.additional_tools": [ + "foo", + "bar" + ] + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -39,34 +65,7 @@ "gcp.vertex.agent.invocation_id": "PRESENT" }, "status": "UNSET", - "children": [ - { - "name": "execute_tool load_skill", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", - "gen_ai.tool.name": "load_skill", - "gen_ai.tool.type": "LoadSkillTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}", - "adk.experimental.skill.name": "local-skill", - "adk.experimental.skill.description": "A sample skill.", - "adk.experimental.skill.source.uri": "file://local-skill", - "adk.experimental.skill.additional_tools": [ - "foo", - "bar" - ] - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice", diff --git a/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-schema-v2.json b/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-schema-v2.json index 9fd59ec3..45987f79 100644 --- a/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-schema-v2.json +++ b/tests/unittests/telemetry/functional_goldens/skill/skill-telemetry-schema-v2.json @@ -31,6 +31,32 @@ }, "status": "UNSET", "children": [ + { + "name": "execute_tool load_skill", + "attributes": { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", + "gen_ai.tool.name": "load_skill", + "gen_ai.tool.type": "LoadSkillTool", + "gen_ai.agent.name": "some_root_agent", + "gcp.vertex.agent.llm_request": "{}", + "gcp.vertex.agent.llm_response": "{}", + "gcp.vertex.agent.tool_call_args": "{}", + "gen_ai.tool.call.id": "PRESENT", + "gcp.vertex.agent.event_id": "PRESENT", + "gcp.vertex.agent.tool_response": "{}", + "adk.experimental.skill.name": "local-skill", + "adk.experimental.skill.description": "A sample skill.", + "adk.experimental.skill.source.uri": "file://local-skill", + "adk.experimental.skill.additional_tools": [ + "foo", + "bar" + ] + }, + "status": "UNSET", + "children": [], + "logs": [] + }, { "name": "generate_content mock", "attributes": { @@ -43,34 +69,7 @@ "gcp.vertex.agent.invocation_id": "PRESENT" }, "status": "UNSET", - "children": [ - { - "name": "execute_tool load_skill", - "attributes": { - "gen_ai.operation.name": "execute_tool", - "gen_ai.tool.description": "Loads the SKILL.md instructions for a given skill.", - "gen_ai.tool.name": "load_skill", - "gen_ai.tool.type": "LoadSkillTool", - "gen_ai.agent.name": "some_root_agent", - "gcp.vertex.agent.llm_request": "{}", - "gcp.vertex.agent.llm_response": "{}", - "gcp.vertex.agent.tool_call_args": "{}", - "gen_ai.tool.call.id": "PRESENT", - "gcp.vertex.agent.event_id": "PRESENT", - "gcp.vertex.agent.tool_response": "{}", - "adk.experimental.skill.name": "local-skill", - "adk.experimental.skill.description": "A sample skill.", - "adk.experimental.skill.source.uri": "file://local-skill", - "adk.experimental.skill.additional_tools": [ - "foo", - "bar" - ] - }, - "status": "UNSET", - "children": [], - "logs": [] - } - ], + "children": [], "logs": [ { "event_name": "gen_ai.choice",