[feat] Add native Langfuse observability integration
Description Add a native Langfuse integration for Guardrails so existing OpenTelemetry traces can be exported to Langfuse with Guardrails-specific enrichment.
Why is this needed Guardrails already emits OpenTelemetry spans, but Langfuse filters these spans by default because the Guardrails instrumentation scope is not recognized. As a result, users cannot observe Guardrails executions in Langfuse without custom telemetry configuration.
Implementation details Reuse Guardrails' existing OpenTelemetry spans rather than creating a parallel tracing implementation. The integration should widen Langfuse's export filter for Guardrails spans, map LLM calls to Langfuse generations, attach model and usage metadata when available, and emit validator and overall validation results as Langfuse scores.
Small core telemetry improvements may be required so model information and stable span attributes are available consistently, including for streaming execution.
The integration should be opt-in through a langfuse package extra.
End result
Users can install guardrails-ai[langfuse], initialize the Langfuse integration, and see Guardrails traces in Langfuse with the guard → step → generation → validator hierarchy and validation scores.
Source: guardrails-ai/guardrails