Converts function output into a standardized SpanOutput format for tracing.
This function processes the return value of a traced function and determines
the appropriate MIME type. String outputs are preserved as text, while other
types are JSON stringified.
Parameters
result: unknown
The function's return value to process into span output format
Converts function output into a standardized SpanOutput format for tracing.
This function processes the return value of a traced function and determines the appropriate MIME type. String outputs are preserved as text, while other types are JSON stringified.