DiagnosticsFunctionInvocationExtensions
NexusLabs.Needlr.AgentFramework¶
NexusLabs.Needlr.AgentFramework.Diagnostics¶
DiagnosticsFunctionInvocationExtensions Class¶
Extension methods for wiring DiagnosticsFunctionInvokingChatClient into an MEAI chat client pipeline.
Inheritance System.Object 🡒 DiagnosticsFunctionInvocationExtensions
Methods¶
DiagnosticsFunctionInvocationExtensions.UseDiagnosticsFunctionInvocation(this ChatClientBuilder, IAgentMetrics, IProgressReporterAccessor) Method¶
Inserts a DiagnosticsFunctionInvokingChatClient into the pipeline that records per-tool-call diagnostics, OTel metrics, and Activity spans.
public static Microsoft.Extensions.AI.ChatClientBuilder UseDiagnosticsFunctionInvocation(this Microsoft.Extensions.AI.ChatClientBuilder builder, NexusLabs.Needlr.AgentFramework.Diagnostics.IAgentMetrics? metrics=null, NexusLabs.Needlr.AgentFramework.Progress.IProgressReporterAccessor? progressAccessor=null);
Parameters¶
builder Microsoft.Extensions.AI.ChatClientBuilder
The chat client builder.
metrics IAgentMetrics
Optional OTel metrics recorder.
progressAccessor IProgressReporterAccessor
Optional progress reporter for real-time events.
Returns¶
Microsoft.Extensions.AI.ChatClientBuilder
The builder, for chaining.
Remarks¶
This replaces the standard UseFunctionInvocation() call. Do not use both —
it would create two FunctionInvokingChatClient layers and produce
duplicate tool calls.