Skip to main content
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 '
{
  "span_id": "<string>",
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "metrics_testing_id": "<string>",
  "logging_method": "api_direct",
  "client_version": "<string>",
  "reliable": true,
  "input": "<string>",
  "output": "<string>",
  "tags": [
    "<string>"
  ],
  "status_code": 123,
  "duration_ns": 123
}
'
{
  "project_id": "<string>",
  "project_name": "<string>",
  "session_id": "<string>",
  "records_count": 123,
  "span_id": "<string>",
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "metrics_testing_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 span.

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>
default:api_direct
Available options:
playground,
python_client,
typescript_client,
api_direct
client_version
string | null
reliable
boolean
default:true

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 span. Overwrites previous value if present.

tags
string[] | null

Tags to add to the span.

status_code
integer | null

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

duration_ns
integer | null

Duration in nanoseconds. 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.