createResponseSpan
function createResponseSpan(options?, parent?): Span<ResponseSpanData>
Create a new response span. The span will not be started automatically, you should either
use withResponseSpan()
or call span.start()
and span.end()
manually.
This span captures the details of a model response, primarily the response identifier.
If you need to capture detailed generation information such as input/output messages,
model configuration, or usage data, use createGenerationSpan()
instead.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
|
|
Optional span creation options, including span data and identifiers. |
|
The parent span or trace. If not provided, the current trace/span will be used automatically. |
Returns
Section titled “Returns”Span
<ResponseSpanData
>
The newly created response span.