Skip to main content

Returns

Returns a list of Trace objects.

Example

galtea.traces.create_batch(
    [
        TraceBase(
            inference_result_id=inference_result_id,
            name="batch_trace_1",
            type=TraceType.SPAN,
        )
    ]
)

Parameters

traces
list[TraceBase]
required
List of trace objects to create. Each trace should include inference_result_id, name, and optionally other fields.

TraceBase Fields

FieldTypeRequiredDescription
inference_result_idstrYesID of the inference result this trace belongs to
namestrYesName of the traced operation
idstrNoClient-generated ID (auto-generated if not provided)
typeTraceTypeNoType: SPAN, GENERATION, EVENT, AGENT, TOOL, CHAIN, RETRIEVER, EVALUATOR, EMBEDDING, GUARDRAIL. See Trace Types
parent_trace_idstrNoID of parent trace
input_datadictNoInput parameters
output_datadictNoOutput result
errorstrNoError message if failed
latency_msfloatNoExecution time in milliseconds
start_timestrNoISO 8601 timestamp when the trace started
end_timestrNoISO 8601 timestamp when the trace ended
metadatadictNoAdditional custom metadata