Function: createTracingHooks()
function createTracingHooks(manager, config?): HooksConfig;
Defined in: tracing/hooks.ts:62
Create tracing hooks that automatically instrument agent execution
Parameters
| Parameter | Type | Description |
|---|---|---|
manager | TracingManager | TracingManager instance |
config | TracingHooksConfig | Tracing hooks configuration |
Returns
HooksConfig with tracing hooks
Example
const tracingManager = new TracingManager({ serviceName: 'my-agent' });
const tracingHooks = createTracingHooks(tracingManager, {
traceLLM: true,
traceTools: true,
traceIterations: true,
});
const agent = new Agent({
provider,
hooks: tracingHooks,
});