Tracking
Create Spans Bulk
POST
Create multiple observability spans in one request, optionally creating a request log alongside each span. Use this endpoint when ingesting telemetry data that is not already sent through OTLP.
Behavior Notes
- When
log_requestis provided, the created request log is associated with the span byspan_id. - If
request_start_timeorrequest_end_timeis omitted fromlog_request, PromptLayer inherits the value from the parent span. - If a referenced prompt is not found, the span is still created but the request log creation for that span is skipped.
- Bulk span creation is atomic; if any span creation fails, the entire batch is rolled back.
Related
Authorizations
Body
application/json
Create multiple observability spans in a single request. Each span may include log_request to create an associated request log.
Response
Successful Response
Span IDs that were dropped because they belong to a closed trace. Only present when one or more spans were rejected.
Trace IDs that were closed and caused span rejections. Only present when one or more spans were rejected.
The reason spans were rejected. Currently only trace_closed is possible. Only present when one or more spans were rejected.
Available options:
trace_closed 
