Package com.ants.platform.guardrails
Class AntsTracer
java.lang.Object
com.ants.platform.guardrails.AntsTracer
Fire-and-forget tracer that sends trace and generation events to the
ANTS ingestion API (
POST /api/public/ingestion).
All logging is asynchronous -- callers are never blocked.
AntsTracer tracer = new AntsTracer("pk:sk", "http://localhost:3000");
tracer.log(TracePayload.builder()
.model("gpt-4o-mini")
.provider("openai")
.inputMessages(messages)
.outputText(output)
.build());
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlog(TracePayload payload) Log a trace + generation event asynchronously (fire-and-forget).voidshutdown()Shut down the background executor.
-
Constructor Details
-
AntsTracer
-
AntsTracer
-
-
Method Details
-
log
Log a trace + generation event asynchronously (fire-and-forget). Errors are printed to stderr but never propagated to the caller. -
shutdown
public void shutdown()Shut down the background executor. Pending traces may be lost.
-