trackToolUse method
void
trackToolUse({})
Track tool usage with duration.
Implementation
void trackToolUse({
required String toolName,
required Duration duration,
bool success = true,
String? error,
}) {
track(
TelemetryEvent(
name: 'tool_use',
type: TelemetryEventType.toolUse,
properties: {
'tool': toolName,
'durationMs': duration.inMilliseconds,
'success': success,
'error': ?error,
},
),
);
}