> ## Documentation Index
> Fetch the complete documentation index at: https://www.adaline.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Log Trace

> Update existing trace information.



## OpenAPI

````yaml PATCH /logs/trace
openapi: 3.1.1
info:
  title: Adaline API
  version: 2.0.0
  description: >-
    Public API for managing Adaline projects, prompts, datasets, evaluators,
    evaluations, providers, models, and deployments.


    Generated from Zod schemas — this spec is the single source of truth.
servers:
  - url: https://api.adaline.ai/v2
    description: Production API
security: []
tags:
  - name: datasets
    description: Manage prompt datasets and their columns and rows.
  - name: projects
    description: List and manage Adaline projects.
  - name: providers
    description: List configured LLM providers and their settings.
  - name: models
    description: List available models across providers.
  - name: prompts
    description: Create and manage prompts and their drafts.
  - name: evaluators
    description: Configure evaluators attached to a prompt.
  - name: evaluations
    description: Run and inspect evaluation results.
  - name: deployments
    description: Retrieve deployed prompt snapshots.
  - name: logs
    description: Ingest execution traces and spans for observability.
paths:
  /logs/trace:
    patch:
      tags:
        - logs
      summary: Update trace log
      description: Update existing trace information.
      operationId: updateLogTrace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLogTraceRequest'
      responses:
        '200':
          description: Trace updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateLogTraceResponse'
          headers:
            X-Request-Id:
              description: >-
                Unique identifier for the request. Returned in every response.
                Send a custom value to correlate requests, or omit to receive a
                generated UUID.
              schema:
                type: string
                format: uuid
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized — invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden — invalid or unauthorized API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Payload too large — span content exceeds max size
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateLogTraceRequest:
      title: Update Log Trace Request
      type: object
      description: Request payload for updating an existing trace by ID or reference ID.
      required:
        - projectId
        - logTrace
      properties:
        projectId:
          $ref: '#/components/schemas/BaseEntityId'
          description: The unique identifier of the project.
        traceId:
          anyOf:
            - $ref: '#/components/schemas/BaseEntityId'
              description: >-
                The ID in Adaline of the trace (required if referenceId not
                provided).
            - type: 'null'
        referenceId:
          type:
            - string
            - 'null'
          description: Reference ID of the trace (required if traceId not provided).
          minLength: 1
          maxLength: 128
        logTrace:
          $ref: '#/components/schemas/UpdateLogTraceRequestTrace'
          description: >-
            Trace update data for modifying status, end time, attributes, and
            tags
    UpdateLogTraceResponse:
      title: Update Log Trace Response
      type: object
      description: Response containing the result of a trace update operation.
      required:
        - success
      properties:
        success:
          type: boolean
          description: Whether the trace update operation was successful.
    ErrorResponse:
      title: Error Response
      type: object
      description: >-
        Standard error response envelope. Permits backend-specific sibling
        fields (e.g. Zod issue details) alongside the typed `error`.
      properties:
        error:
          description: >-
            Error details — typed envelope, or a raw string reason when the
            backend's validator produces a short summary (e.g. Zod validation
            fallback).
          oneOf:
            - type: string
            - type: object
              properties:
                code:
                  type: string
                  description: Machine-readable error code.
                  enum:
                    - VALIDATION_ERROR
                    - INVALID_CURSOR
                    - AUTHENTICATION_REQUIRED
                    - FORBIDDEN
                    - RESOURCE_NOT_FOUND
                    - CONFLICT
                    - PAYLOAD_TOO_LARGE
                    - RATE_LIMITED
                    - INTERNAL_ERROR
                message:
                  type: string
                  description: Human-readable error message.
                details:
                  type: array
                  description: Optional field-level validation details.
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                      issue:
                        type: string
                    required:
                      - field
                      - issue
              required:
                - code
                - message
              additionalProperties: true
      required:
        - error
      additionalProperties: true
    BaseEntityId:
      title: Base Entity ID
      type: string
      description: Unique identifier for an entity, between 20 and 80 characters.
      minLength: 20
      maxLength: 80
    UpdateLogTraceRequestTrace:
      title: Update Log Trace Request Trace
      type: object
      description: Trace update data for modifying status, end time, attributes, and tags.
      properties:
        status:
          type:
            - string
            - 'null'
          enum:
            - success
            - failure
            - aborted
            - cancelled
            - pending
            - unknown
        endedAt:
          anyOf:
            - $ref: '#/components/schemas/UnixTimestamp'
              description: >-
                Unix timestamp when the trace ended. If not provided, the
                current time will be used.
            - type: 'null'
        attributes:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/UpdateLogTraceRequestAttributeItem'
            description: >-
              Attribute operation for updating trace metadata (create or delete
              key-value pairs)
          minItems: 1
          maxItems: 10
        tags:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/UpdateLogTraceRequestTagItem'
            description: Tag operation for updating trace metadata (create or delete tags)
          minItems: 1
          maxItems: 10
    UnixTimestamp:
      title: Unix Timestamp
      type: integer
      format: int64
      description: Unix timestamp in milliseconds.
      minimum: 1672511400000
      maximum: 33229420200000
    UpdateLogTraceRequestAttributeItem:
      title: Update Log Trace Request Attribute Item
      description: >-
        Attribute operation for updating trace metadata (create or delete
        key-value pairs)
      oneOf:
        - title: Create
          type: object
          required:
            - operation
            - key
            - value
          properties:
            operation:
              type: string
              enum:
                - create
            key:
              type: string
              description: Attribute key to create.
            value:
              oneOf:
                - type: string
                - type: number
                - type: boolean
              description: Attribute value to create.
        - title: Delete
          type: object
          required:
            - operation
            - key
          properties:
            operation:
              type: string
              enum:
                - delete
            key:
              type: string
              description: Attribute key to delete.
      discriminator:
        propertyName: operation
    UpdateLogTraceRequestTagItem:
      title: Update Log Trace Request Tag Item
      description: Tag operation for updating trace categorization (create or delete tags)
      oneOf:
        - title: Create
          type: object
          description: Tag to create.
          required:
            - operation
            - tag
          properties:
            operation:
              type: string
              enum:
                - create
            tag:
              type: string
              minLength: 1
              maxLength: 256
        - title: Delete
          type: object
          description: Tag to delete.
          required:
            - operation
            - tag
          properties:
            operation:
              type: string
              enum:
                - delete
            tag:
              type: string
              minLength: 1
              maxLength: 256
      discriminator:
        propertyName: operation
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Workspace API key. Pass as `Authorization: Bearer <key>`.'

````