observability • TypeScript AI Agent SDK
* Observability Module – Unified tracing, logging, and metrics
observability
TypeScript AI Agent
- Observability Module – Unified tracing, logging, and metrics
- Delivery status, as of this version:
- – Langfuse – delivers, via the optional
langfuseSDK.isEnabledis true
only once initialize() has built a client from that SDK.
- console – prints traces locally (built-in).
- memory – keeps traces in process (built-in).
- noop – discards everything, and says so (
isEnabled === false). - LangSmith, LangWatch, Arize, Axiom, Braintrust, Helicone, Laminar, Maxim,
Patronus, Scorecard, SigNoz, Traceloop and Weave have adapter shells but NO delivery: they record spans in memory and send nothing to the vendor. They report isEnabled === false, warn on construction, and warn again on flush(). Do not rely on them to get traces off the machine. See adapters/external/undelivered.ts.
import { createObservabilityAdapter, setObservabilityAdapter } from 'praisonai';
* // Enable observability. Always check isEnabled: an adapter with no delivery
// implementation reports false and will not send your traces anywhere.
const adapter = await createObservabilityAdapter('langfuse');
if (!adapter.isEnabled) {
console.warn('traces will stay in memory only');
}
setObservabilityAdapter(adapter);
* // Use with agents
const agent = new Agent({
instructions: "You are helpful"
});Import
import { observability } from 'praisonai';Functions
setObservabilityAdapter()
Function definition.
getObservabilityAdapter()Function definition.
resetObservabilityAdapter()Function definition.
trace()Function definition.