refactor(telemetry): pass config object to telemetry functions

This commit refactors the telemetry system to pass a  object to various logging and metrics functions. This change centralizes configuration management within the telemetry system, making it more modular and easier to maintain.

The  constructor and various tool execution functions have been updated to accept the  object, which is then passed down to the telemetry functions. This eliminates the need to pass individual configuration values, such as , through multiple layers of the application.
This commit is contained in:
jerop
2025-06-11 16:50:24 +00:00
committed by Jerop Kipruto
parent 9c5b5ff823
commit d96af8bacd
14 changed files with 129 additions and 38 deletions

View File

@@ -122,7 +122,7 @@ export function useReactToolScheduler(
}
duration = call.durationMs || 0;
logToolCall({
logToolCall(config, {
function_name: call.request.name,
function_args: call.request.args,
duration_ms: duration,