User Guide
This guide covers all major features of spanforge in depth. Start with Events if you are new to the library, then proceed to whichever features your use case requires.
Contents
- Events
- Tracing API —
Trace,start_trace(), async spans,add_event(), error categories - HMAC Signing & Audit Chains
- PII Redaction
- Compliance & Tenant Isolation
- Export Backends & EventStream
- Governance, Consumer Registry & Deprecations
- Migration Guide
- Debugging & Visualization —
print_tree(),summary(),visualize(), sampling - Metrics & Analytics —
metrics.aggregate(),MetricsSummary,TraceStore - Semantic Cache —
SemanticCache,@cached,InMemoryBackend,SQLiteBackend,RedisBackend - Linting & Static Analysis —
run_checks(), AO001–AO005, flake8 plugin, CI integration - Audit Service (sf-audit) —
sf_audit.append(), schema key registry, T.R.U.S.T. scorecard, chain verification, GDPR Article 30, BYOS routing - In-Memory State Behaviour — risks of local/sandbox mode, multi-process inconsistency, production checklist
- Runtime Governance GA Guide — GA services, policy actions, replay/simulation, operator workflow, evidence exports
- Runtime Governance Contracts — stable GA control contracts, evidence contract, and fallback semantics
- Replay, Simulation, and Calibration — candidate-policy testing, comparison, and threshold tuning
- Evidence Export Guide — operator packages, enterprise packages, JSONL archives, SIEM, and OpenInference
- Enterprise Integrations — OpenAI, Anthropic, Azure OpenAI, LangChain, LangGraph, OTLP, JSONL, SIEM
- RAG Tracing —
sf_rag.trace_query(), retrieval scoring, grounding, session lifecycle, privacy controls - User Feedback —
sf_feedback.submit(), rating enums, NPS/CSAT/thumbs, T.R.U.S.T. integration - SSO & Identity — SAML 2.0, SCIM 2.0, OIDC PKCE, SSO session delegation,
SFIdentityClient
Ready to instrument your AI pipeline?