v2

latestOpenAPI 3.1.02026-07-2670186350.6 KB
spans

Create Span

Create a new span

post/spans

Request body

namestring required

The name of the span, something descriptive about the span that will be used to identify it when querying

start_timestring date-time nullable

The start time of the span in UTC

idstring uuid nullable

The id of the span

trace_idstring uuid nullable

The id of the trace

parent_idstring uuid nullable

The id of the parent span

typestring nullable

The type of the span

end_timestring date-time nullable

The end time of the span in UTC

inputstring nullable

The input of the span

outputstring nullable

The output of the span

errorstring nullable

In case of an error, the error message

metaobject nullable

The metadata of the span

scoreinteger nullable

The score of the span

Example request

{
  "name": "my span",
  "start_time": "2024-03-20T10:00:00+00:00",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "trace_id": "123e4567-e89b-12d3-a456-426614174000",
  "parent_id": "123e4567-e89b-12d3-a456-426614174000",
  "type": "email_tool",
  "end_time": "2024-03-20T10:00:10+00:00",
  "input": "Hello, world!",
  "output": "Hello, world!",
  "error": "Exception: This is an error message",
  "meta": {
    "key": "value"
  },
  "score": 10
}

Response

Successful Response

namestring required

The name of the span, something descriptive about the span that will be used to identify it when querying

start_timestring date-time nullable

The start time of the span in UTC

idstring uuid required
trace_idstring uuid nullable

The id of the trace

parent_idstring uuid nullable

The id of the parent span

typestring nullable

The type of the span

end_timestring date-time nullable

The end time of the span in UTC

inputstring nullable

The input of the span

outputstring nullable

The output of the span

errorstring nullable

In case of an error, the error message

metaobject nullable

The metadata of the span

scoreinteger nullable

The score of the span

Example response

{
  "name": "my span",
  "start_time": "2024-03-20T10:00:00+00:00",
  "trace_id": "123e4567-e89b-12d3-a456-426614174000",
  "parent_id": "123e4567-e89b-12d3-a456-426614174000",
  "type": "email_tool",
  "end_time": "2024-03-20T10:00:10+00:00",
  "input": "Hello, world!",
  "output": "Hello, world!",
  "error": "Exception: This is an error message",
  "meta": {
    "key": "value"
  },
  "score": 10
}