ExecuteToolScope class
Provides OpenTelemetry tracing scope for AI tool execution operations.
- Extends
Methods
| record |
Records response information for telemetry tracking. |
| start(Tool |
Creates and starts a new scope for tool execution tracing. |
Inherited Methods
| dispose() | Legacy dispose method for compatibility |
| record |
Records an error that occurred during the operation |
| with |
Makes this span active for the duration of the async callback execution |
Method Details
recordResponse(string)
Records response information for telemetry tracking.
function recordResponse(response: string)
Parameters
- response
-
string
The tool execution response
start(ToolCallDetails, AgentDetails, TenantDetails)
Creates and starts a new scope for tool execution tracing.
static function start(details: ToolCallDetails, agentDetails: AgentDetails, tenantDetails: TenantDetails): ExecuteToolScope
Parameters
- details
- ToolCallDetails
The tool call details
- agentDetails
- AgentDetails
The agent details
- tenantDetails
- TenantDetails
The tenant details
Returns
A new ExecuteToolScope instance.
Inherited Method Details
dispose()
Legacy dispose method for compatibility
function dispose()
Inherited From OpenTelemetryScope.dispose
recordError(Error)
Records an error that occurred during the operation
function recordError(error: Error)
Parameters
- error
-
Error
The error that occurred
Inherited From OpenTelemetryScope.recordError
withActiveSpanAsync<T>(() => Promise<T>)
Makes this span active for the duration of the async callback execution
function withActiveSpanAsync<T>(callback: () => Promise<T>): Promise<T>
Parameters
- callback
-
() => Promise<T>
Returns
Promise<T>
Inherited From OpenTelemetryScope.withActiveSpanAsync