Class Instrumentation
java.lang.Object
com.google.adk.telemetry.Instrumentation
Unified context manager utility class for agent and tool execution telemetry in ADK.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAutoCloseable telemetry tracking scope for agent invocations.static classBase class for AutoCloseable telemetry tracking scopes.static final classStores all telemetry related state.static final classAutoCloseable telemetry tracking scope for tool executions. -
Method Summary
Modifier and TypeMethodDescriptionrecordAgentInvocation(InvocationContext ctx, BaseAgent agent) Creates an AgentInvocation context to record agent invocation telemetry.recordAgentInvocation(InvocationContext ctx, BaseAgent agent, io.opentelemetry.context.Context parentContext) Creates a ToolExecution context to record tool execution telemetry.recordToolExecution(BaseTool tool, BaseAgent agent, Map<String, Object> functionArgs, io.opentelemetry.context.Context parentContext)
-
Method Details
-
recordAgentInvocation
public static Instrumentation.AgentInvocation recordAgentInvocation(InvocationContext ctx, BaseAgent agent) Creates an AgentInvocation context to record agent invocation telemetry. -
recordAgentInvocation
public static Instrumentation.AgentInvocation recordAgentInvocation(InvocationContext ctx, BaseAgent agent, io.opentelemetry.context.Context parentContext) -
recordToolExecution
-
recordToolExecution
-