Share via


ExecuteToolScope Class

Provides OpenTelemetry tracing scope for AI tool execution operations.

Initialize the tool execution scope.

Constructor

ExecuteToolScope(details: ToolCallDetails, agent_details: AgentDetails, tenant_details: TenantDetails)

Parameters

Name Description
details
Required

The details of the tool call

agent_details
Required

The details of the agent making the call

tenant_details
Required

The details of the tenant

Methods

record_response

Records response information for telemetry tracking.

start

Creates and starts a new scope for tool execution tracing.

record_response

Records response information for telemetry tracking.

record_response(response: str) -> None

Parameters

Name Description
response
Required

The response to record

start

Creates and starts a new scope for tool execution tracing.

static start(details: ToolCallDetails, agent_details: AgentDetails, tenant_details: TenantDetails) -> ExecuteToolScope

Parameters

Name Description
details
Required

The details of the tool call

agent_details
Required

The details of the agent making the call

tenant_details
Required

The details of the tenant

Returns

Type Description

A new ExecuteToolScope instance