Arize Phoenix TS
    Preparing search index...
    • Converts function arguments into a standardized SpanInput format for tracing.

      This function processes variable arguments and determines the appropriate MIME type based on the input. Single string arguments are preserved as text, while other types are JSON stringified.

      Parameters

      • ...args: unknown[]

        The function arguments to process into span input format

      Returns SpanInput | undefined

      A SpanInput object with value and mimeType, or undefined if no args provided

      // String input
      toInputType("hello") // { value: "hello", mimeType: MimeType.TEXT }

      // Object input
      toInputType({ key: "value" }) // { value: '{"key":"value"}', mimeType: MimeType.JSON }

      // Multiple arguments
      toInputType("arg1", 42) // { value: '["arg1",42]', mimeType: MimeType.JSON }