nemoguardrails.tracing.span_formatting
nemoguardrails.tracing.span_formatting
Simple span formatting functions for different output formats.
Module Contents
Functions
API
Extract OpenTelemetry attributes from any span type.
Parameters:
span
Either SpanLegacy or typed span
Returns: Dict[str, Any]
Dictionary of OpenTelemetry attributes
Format any span type for JSON filesystem storage.
Parameters:
span
Either SpanLegacy or typed span (InteractionSpan, RailSpan, etc.)
Returns: Dict[str, Any]
Dictionary with all span data for JSON serialization
Return the schema version string based on the span type.