PATCH
/
v2
/
projects
/
{project_id}
/
spans
/
{span_id}
Update Span
curl --request PATCH \
  --url https://api.galileo.ai/v2/projects/{project_id}/spans/{span_id} \
  --header 'Content-Type: application/json' \
  --header 'Galileo-API-Key: <api-key>' \
  --data '{
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "metrics_testing_id": "<string>",
  "logging_method": "api_direct",
  "client_version": "<string>",
  "reliable": false,
  "span_id": "<string>",
  "input": "<string>",
  "output": "<string>",
  "tags": [
    "<string>"
  ],
  "status_code": 123
}'
{
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "metrics_testing_id": "<string>",
  "project_id": "<string>",
  "project_name": "<string>",
  "session_id": "<string>",
  "records_count": 123,
  "span_id": "<string>"
}

Authorizations

Galileo-API-Key
string
header
required

Path Parameters

span_id
string<uuid4>
required
project_id
string<uuid4>
required

Body

application/json

Request model for updating a trace.

span_id
string<uuid4>
required

Span id to update.

log_stream_id
string<uuid4> | null

Log stream id associated with the traces.

experiment_id
string<uuid4> | null

Experiment id associated with the traces.

metrics_testing_id
string<uuid4> | null

Metrics testing id associated with the traces.

logging_method
enum<string>
Available options:
playground,
python_client,
typescript_client,
api_direct
client_version
string | null
reliable
boolean
default:false

Whether or not to use reliable logging. If set to False, the method will respond immediately before verifying that the traces have been successfully ingested, and no error message will be returned if ingestion fails. If set to True, the method will wait for the traces to be successfully ingested or return an error message if there is an ingestion failure.

input

Input of the span. Overwrites previous value if present.

output

Output of the trace. Overwrites previous value if present.

tags
string[] | null

Tags to add to the span.

status_code
integer | null

Status code of the trace. Overwrites previous value if present.

Response

Successful Response

project_id
string<uuid4>
required

Project id associated with the traces.

project_name
string
required

Project name associated with the traces.

session_id
string<uuid4>
required

Session id associated with the traces.

records_count
integer
required

Total number of records ingested

span_id
string<uuid4>
required

Span id associated with the updated span.

log_stream_id
string<uuid4> | null

Log stream id associated with the traces.

experiment_id
string<uuid4> | null

Experiment id associated with the traces.

metrics_testing_id
string<uuid4> | null

Metrics testing id associated with the traces.