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

# Update Trace by OTEL Span ID

> 
Update a trace's output, metadata, feedback, eval results, and/or test run info by its OpenTelemetry span ID (hex string).

Note: OTEL spans are mapped to Freeplay Traces, so we use the OTEL span ID to identify Traces.



## OpenAPI

````yaml https://app.freeplay.ai/openapi.json patch /api/v2/projects/{project_id}/sessions/{session_id}/traces/otel-span-id/{otel_span_id_hex}
openapi: 3.1.0
info:
  title: Freeplay API
  version: 0.1.0
servers: []
security:
  - BearerAuth: []
paths:
  /api/v2/projects/{project_id}/sessions/{session_id}/traces/otel-span-id/{otel_span_id_hex}:
    patch:
      tags:
        - Observability
      summary: Update Trace by OTEL Span ID
      description: >-

        Update a trace's output, metadata, feedback, eval results, and/or test
        run info by its OpenTelemetry span ID (hex string).


        Note: OTEL spans are mapped to Freeplay Traces, so we use the OTEL span
        ID to identify Traces.
      operationId: patch_update_trace_by_otel_span_id
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: session_id
          in: path
          required: true
          schema:
            type: string
        - name: otel_span_id_hex
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                output:
                  default: null
                  oneOf:
                    - $ref: '#/components/schemas/JSONValue'
                    - type: 'null'
                metadata:
                  default: null
                  title: Metadata
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: integer
                      - type: boolean
                  type:
                    - object
                    - 'null'
                feedback:
                  default: null
                  title: Feedback
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: integer
                      - type: boolean
                  type:
                    - object
                    - 'null'
                eval_results:
                  default: null
                  title: Eval Results
                  additionalProperties:
                    anyOf:
                      - type: number
                      - type: boolean
                  type:
                    - object
                    - 'null'
                test_run_info:
                  default: null
                  oneOf:
                    - $ref: '#/components/schemas/TestRunInfo'
                    - type: 'null'
              title: TraceUpdateRequest
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  message:
                    title: Message
                    type: string
                required:
                  - message
                title: SimpleResponseWithMessage
                type: object
          description: 'SimpleResponseWithMessage(message: str)'
components:
  schemas:
    JSONValue:
      anyOf:
        - type: boolean
        - type: integer
        - type: number
        - type: string
        - additionalProperties:
            $ref: '#/components/schemas/JSONValue'
          type: object
        - items:
            $ref: '#/components/schemas/JSONValue'
          type: array
        - type: 'null'
    TestRunInfo:
      properties:
        test_run_id:
          format: uuid
          title: Test Run Id
          type: string
        test_case_id:
          format: uuid
          title: Test Case Id
          type: string
      required:
        - test_run_id
        - test_case_id
      title: TestRunInfo
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````