Class TelemetryTracer

java.lang.Object
io.agentscope.core.tracing.telemetry.TelemetryTracer
All Implemented Interfaces:
io.agentscope.core.tracing.Tracer

public class TelemetryTracer extends Object implements io.agentscope.core.tracing.Tracer
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TelemetryTracer(io.opentelemetry.api.trace.Tracer tracer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    reactor.core.publisher.Mono<io.agentscope.core.message.Msg>
    callAgent(io.agentscope.core.agent.AgentBase instance, List<io.agentscope.core.message.Msg> inputMessages, Supplier<reactor.core.publisher.Mono<io.agentscope.core.message.Msg>> agentCall)
     
    <TReq, TResp, TParams>
    List<TReq>
    callFormat(io.agentscope.core.formatter.AbstractBaseFormatter<TReq,TResp,TParams> formatter, List<io.agentscope.core.message.Msg> msgs, Supplier<List<TReq>> formatCall)
     
    reactor.core.publisher.Flux<io.agentscope.core.model.ChatResponse>
    callModel(io.agentscope.core.model.ChatModelBase instance, List<io.agentscope.core.message.Msg> inputMessages, List<io.agentscope.core.model.ToolSchema> toolSchemas, io.agentscope.core.model.GenerateOptions options, Supplier<reactor.core.publisher.Flux<io.agentscope.core.model.ChatResponse>> modelCall)
     
    reactor.core.publisher.Mono<io.agentscope.core.message.ToolResultBlock>
    callTool(io.agentscope.core.tool.Toolkit instance, io.agentscope.core.tool.ToolCallParam toolCallParam, Supplier<reactor.core.publisher.Mono<io.agentscope.core.message.ToolResultBlock>> toolKitCall)
     
    <TResp> TResp
    runWithContext(reactor.util.context.ContextView reactorCtx, Supplier<TResp> inner)
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TelemetryTracer

      public TelemetryTracer(io.opentelemetry.api.trace.Tracer tracer)
  • Method Details

    • callAgent

      public reactor.core.publisher.Mono<io.agentscope.core.message.Msg> callAgent(io.agentscope.core.agent.AgentBase instance, List<io.agentscope.core.message.Msg> inputMessages, Supplier<reactor.core.publisher.Mono<io.agentscope.core.message.Msg>> agentCall)
      Specified by:
      callAgent in interface io.agentscope.core.tracing.Tracer
    • callModel

      public reactor.core.publisher.Flux<io.agentscope.core.model.ChatResponse> callModel(io.agentscope.core.model.ChatModelBase instance, List<io.agentscope.core.message.Msg> inputMessages, List<io.agentscope.core.model.ToolSchema> toolSchemas, io.agentscope.core.model.GenerateOptions options, Supplier<reactor.core.publisher.Flux<io.agentscope.core.model.ChatResponse>> modelCall)
      Specified by:
      callModel in interface io.agentscope.core.tracing.Tracer
    • callTool

      public reactor.core.publisher.Mono<io.agentscope.core.message.ToolResultBlock> callTool(io.agentscope.core.tool.Toolkit instance, io.agentscope.core.tool.ToolCallParam toolCallParam, Supplier<reactor.core.publisher.Mono<io.agentscope.core.message.ToolResultBlock>> toolKitCall)
      Specified by:
      callTool in interface io.agentscope.core.tracing.Tracer
    • callFormat

      public <TReq, TResp, TParams> List<TReq> callFormat(io.agentscope.core.formatter.AbstractBaseFormatter<TReq,TResp,TParams> formatter, List<io.agentscope.core.message.Msg> msgs, Supplier<List<TReq>> formatCall)
      Specified by:
      callFormat in interface io.agentscope.core.tracing.Tracer
    • runWithContext

      public <TResp> TResp runWithContext(reactor.util.context.ContextView reactorCtx, Supplier<TResp> inner)
      Specified by:
      runWithContext in interface io.agentscope.core.tracing.Tracer
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface io.agentscope.core.tracing.Tracer
    • builder

      public static TelemetryTracer.Builder builder()