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

# Configure log export destination

> Configures the external OTLP endpoint a function's runtime and/or invocation logs are pushed to as they happen. This operation is a **full replace, not a patch**: `endpoint`, `headers`, `runtime_export_enabled`, and `invocation_export_enabled` are all required on every call — omitting any of them is a 422, not "keep the current value". Headers are encrypted at rest and never returned in any response.

The endpoint must be an HTTPS URL. When export is configured, new log records are converted to OTLP log records and delivered continuously; export never bypasses platform log storage, and delivery retries with a bounded policy while the destination is unreachable. Only logs generated after configuration are exported — there is no historical replay.



## OpenAPI

````yaml /openapi/source/external/edge-compute/functions-observability.json put /compute/funcs/{id}/logs/export
openapi: 3.1.0
info:
  title: Edge Compute Function Observability API
  description: >-
    Customer-facing Edge Compute function logs, metrics, deployment history, and
    ship inspection.
  version: '1.0'
  x-latency-category: responsive
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /compute/funcs/{id}/logs/export:
    put:
      tags:
        - functions
      summary: Configure log export destination
      description: >-
        Configures the external OTLP endpoint a function's runtime and/or
        invocation logs are pushed to as they happen. This operation is a **full
        replace, not a patch**: `endpoint`, `headers`, `runtime_export_enabled`,
        and `invocation_export_enabled` are all required on every call —
        omitting any of them is a 422, not "keep the current value". Headers are
        encrypted at rest and never returned in any response.


        The endpoint must be an HTTPS URL. When export is configured, new log
        records are converted to OTLP log records and delivered continuously;
        export never bypasses platform log storage, and delivery retries with a
        bounded policy while the destination is unreachable. Only logs generated
        after configuration are exported — there is no historical replay.
      operationId: SetComputeFunctionLogExport
      parameters:
        - name: id
          in: path
          required: true
          description: Function ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FuncLogExportConfigSetRequest'
            examples:
              honeycomb:
                summary: Export both log types to Honeycomb
                value:
                  endpoint: https://api.honeycomb.io/v1/logs
                  headers:
                    x-honeycomb-team: abc123
                  runtime_export_enabled: true
                  invocation_export_enabled: true
              invocations_only:
                summary: Export invocation records only
                value:
                  endpoint: https://collector.example.com/v1/logs
                  headers: {}
                  runtime_export_enabled: false
                  invocation_export_enabled: true
      responses:
        '200':
          description: Log export configuration replaced successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FuncLogExportConfigResponse'
              examples:
                replaced:
                  value:
                    data:
                      record_type: compute_func_log_export_config
                      id: cfg-1
                      func_id: 6b7e8f9a-1c2d-3e4f-5a6b-7c8d9e0f1a2b
                      endpoint: https://api.honeycomb.io/v1/logs
                      enabled: true
                      runtime_export_enabled: true
                      invocation_export_enabled: true
                      created_at: '2026-09-18T14:30:00.000Z'
                      updated_at: '2026-09-21T18:00:00.000Z'
        '201':
          description: Log export configuration created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FuncLogExportConfigResponse'
              examples:
                created:
                  value:
                    data:
                      record_type: compute_func_log_export_config
                      id: cfg-1
                      func_id: 6b7e8f9a-1c2d-3e4f-5a6b-7c8d9e0f1a2b
                      endpoint: https://api.honeycomb.io/v1/logs
                      enabled: true
                      runtime_export_enabled: true
                      invocation_export_enabled: true
                      created_at: '2026-09-21T18:00:00.000Z'
                      updated_at: '2026-09-21T18:00:00.000Z'
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                error:
                  value:
                    errors:
                      - code: '10020'
                        title: Unprocessable entity
                        detail: Request could not be processed.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                error:
                  value:
                    errors:
                      - code: '10001'
                        title: Unauthorized
                        detail: Invalid or missing API key.
        '404':
          description: Function not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                error:
                  value:
                    errors:
                      - code: '10005'
                        title: Resource not found
                        detail: The requested resource or URL could not be found.
        '422':
          description: >-
            Invalid function ID, or a required request field was omitted (full
            replace — no partial updates)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                missing_required_field:
                  value:
                    errors:
                      - code: '10020'
                        title: Unprocessable entity
                        detail: >-
                          Request could not be processed: this endpoint is a
                          full replace — endpoint, headers,
                          runtime_export_enabled, and invocation_export_enabled
                          are all required on every call.
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                error:
                  value:
                    errors:
                      - code: '10010'
                        title: Internal server error
                        detail: An unexpected error occurred.
components:
  schemas:
    FuncLogExportConfigSetRequest:
      type: object
      description: >-
        Full-replace configuration body. All fields are required on every call:
        the API treats PUT as a replace (RFC 7231), so omitting any field is a
        422, not "keep the current value".
      required:
        - endpoint
        - headers
        - runtime_export_enabled
        - invocation_export_enabled
      properties:
        endpoint:
          type: string
          format: uri
          description: HTTPS URL to push logs to
        headers:
          type: object
          description: >-
            Headers attached to every export push, as key-value pairs (e.g. an
            auth token the collector expects). Required even when empty — {}
            means "no headers". Encrypted at rest; never returned.
          additionalProperties:
            type: string
        runtime_export_enabled:
          type: boolean
          description: Export runtime logs (function stdout/stderr) to this destination
        invocation_export_enabled:
          type: boolean
          description: Export invocation records (one per HTTP request) to this destination
    FuncLogExportConfigResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/FuncLogExportConfig'
    Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    FuncLogExportConfig:
      type: object
      description: >-
        Metadata-only view of a function's log export destination. Header values
        are write-only (encrypted server-side) and never appear in any response.
      properties:
        record_type:
          type: string
          enum:
            - compute_func_log_export_config
        id:
          type: string
          description: Configuration record ID
        func_id:
          type: string
          description: Function ID this configuration belongs to
        endpoint:
          type: string
          format: uri
          description: HTTPS OTLP endpoint URL logs are pushed to
        enabled:
          type: boolean
          description: Whether export is enabled for this function
        runtime_export_enabled:
          type: boolean
          description: Whether runtime logs (function stdout/stderr) are exported
        invocation_export_enabled:
          type: boolean
          description: Whether invocation records (one per HTTP request) are exported
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````