Package ai.acolite.agentsdk.core.tracing


package ai.acolite.agentsdk.core.tracing
Distributed tracing and observability for agent execution.

This package provides tracing infrastructure to monitor and debug agent execution:

Example: Custom Trace Processor


 // Register a custom trace processor
 TraceProvider.getInstance().registerProcessor(new TraceProcessor() {
     @Override
     public void processTrace(Trace trace) {
         System.out.println("Trace: " + trace.getId());
         trace.getSpans().forEach(span ->
             System.out.println("  Span: " + span.getName())
         );
     }
 });

 // Traces are automatically created during agent execution
 Runner.run(agent, "Hello!");
 

OpenAI Platform Integration

Tracing data is automatically sent to the OpenAI platform for visualization when the OPENAI_API_KEY environment variable is set.

See Also: