The SpanOutput object, string, or undefined to convert
OpenTelemetry attributes with OUTPUT_VALUE and OUTPUT_MIME_TYPE keys
// SpanOutput object
getOutputAttributes({ value: "result", mimeType: MimeType.TEXT })
// Returns: { [OUTPUT_VALUE]: "result", [OUTPUT_MIME_TYPE]: MimeType.TEXT }
// String input
getOutputAttributes("simple string")
// Returns: { [OUTPUT_VALUE]: "simple string", [OUTPUT_MIME_TYPE]: MimeType.TEXT }
// Undefined input
getOutputAttributes(undefined) // Returns: {}
Converts a SpanOutput object or string into OpenTelemetry attributes.
This function transforms span output data into the standardized attribute format used by OpenTelemetry, mapping values to the appropriate semantic convention keys.