Package com.tnsai.llm.observability
Class Slf4jLLMCallPublisher
java.lang.Object
com.tnsai.llm.observability.Slf4jLLMCallPublisher
- All Implemented Interfaces:
LLMCallPublisher
Default
LLMCallPublisher that emits one structured SLF4J line
per LLM call (issue #79).
Failed calls log at WARN; successful calls at INFO.
The line carries provider/model, elapsed milliseconds, token totals,
and total USD cost — enough for ad-hoc tail-and-grep diagnostics
without enabling structured trackers (LangFuse / Helicone).
Intentionally does NOT log raw prompt or response text — those are potentially PII and belong behind the redaction SPI (#80). Operators who need verbose dumps should plug in a custom publisher with their own redaction policy.
- Since:
- 0.9.0 (issue #79)
-
Field Summary
Fields inherited from interface com.tnsai.llm.observability.LLMCallPublisher
NOOP -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Slf4jLLMCallPublisher
public Slf4jLLMCallPublisher()
-
-
Method Details
-
publish
Description copied from interface:LLMCallPublisherPublish one captured LLM call. Must not throw.- Specified by:
publishin interfaceLLMCallPublisher
-