---
title: "Update Trace"
method: PATCH
path: "/v2/projects/{project_id}/traces/{trace_id}"
tags: ["trace"]
---

# Update Trace

`PATCH /v2/projects/{project_id}/traces/{trace_id}`

Update a trace with the given ID.

## Path parameters

- `trace_id` string, uuid4, required
- `project_id` string, uuid4, required

## Request body

- LogTraceUpdateRequest — Request model for updating a trace.
  - `log_stream_id` string, uuid4, nullable — Log stream id associated with the traces.
  - `experiment_id` string, uuid4, nullable — Experiment id associated with the traces.
  - `metrics_testing_id` string, uuid4, nullable — Metrics testing id associated with the traces.
  - `logging_method` 'playground' | 'python_client' | 'typescript_client' | 'api_direct'
  - `client_version` string, nullable
  - `reliable` boolean — 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.
  - `trace_id` string, uuid4, required — Trace id to update.
  - `input` string, nullable — Input of the trace. Overwrites previous value if present.
  - `output` string, nullable — Output of the trace. Overwrites previous value if present.
  - `status_code` integer, nullable — Status code of the trace. Overwrites previous value if present.
  - `tags` string[], nullable — Tags to add to the trace.
  - `is_complete` boolean, nullable — Whether or not the records in this request are complete.
  - `duration_ns` integer, nullable — Duration in nanoseconds. Overwrites previous value if present.

## Response `200`

Successful Response

- LogTraceUpdateResponse
  - `log_stream_id` string, uuid4, nullable — Log stream id associated with the traces.
  - `experiment_id` string, uuid4, nullable — Experiment id associated with the traces.
  - `metrics_testing_id` string, uuid4, nullable — Metrics testing id associated with the traces.
  - `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, nullable — Session id associated with the traces.
  - `records_count` integer, required — Total number of records ingested
  - `trace_id` string, uuid4, required — Trace id associated with the updated trace.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/galileo/apis/galileo-api-server.md) · [All operations](https://skmtc.net/galileo/apis/galileo-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/galileo/galileo-api-server/versions/933e8c8e6366/schema)
