Skip to main content
POST
/
traces
Create Trace
curl --request POST \
  --url https://api.promptmetrics.dev/traces \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "trace_id": "<string>",
  "span_id": "<string>",
  "function_name": "<string>",
  "start_time": "2023-11-07T05:31:56Z",
  "end_time": "2023-11-07T05:31:56Z",
  "duration_ms": 1,
  "status": "SUCCESS"
}
'
{
  "responseData": {
    "data": {}
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
trace_id
string
required
span_id
string
required
function_name
string
required
start_time
string<date-time>
required
end_time
string<date-time>
required
duration_ms
number
required
Required range: x >= 0
status
enum<string>
required
Available options:
SUCCESS,
ERROR,
PENDING
parent_span_id
string | null
error
object
input
object
output
object
metadata
object
scores
object[]
tags
string[]
group_id
string
group_type
string

Response

Trace created

responseData
object