---
title: "Change a project's Cloud telemetry write mode and/or fidelity."
method: PATCH
path: "/otel/cloud-telemetry/projects/{project_id}"
tags: ["OTel"]
---

# Change a project's Cloud telemetry write mode and/or fidelity.

`PATCH /otel/cloud-telemetry/projects/{project_id}`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/otel/cloud-telemetry/projects/{project_id}`
- Auth: HTTP bearer

## Path parameters

- `project_id` integer, required

## Request body

- UpdateProjectCloudTelemetryRequest: Body for changing a project's Cloud telemetry settings. Both fields are optional and independent: an operator raising fidelity and one flipping the write mode are two different acts, and forcing a client to send both would make each one able to clobber the other.
  - `analytics_write_mode` 'local' | 'cloud', nullable: Per-project destination for analytics and metrics writes (ADR-043 §1).
  - `attribute_allowlist` string[], nullable
  - `fidelity` 'metered' | 'queryable', nullable: Per-project fidelity tier for the optional Temps Cloud telemetry mirror.
  - `write_mode` 'local' | 'cloud', nullable: Per-project destination for span writes.

## Response `200`

Updated settings

- ProjectCloudTelemetryResponse: A project's Cloud telemetry configuration, in every state.
  - `analytics_write_mode` 'local' | 'cloud', required: ADR-043 §1: the independent analytics write mode (metrics under Phase C1). Orthogonal to `write_mode` — a project may be Cloud-primary for spans and local for analytics, or vice versa.
  - `attribute_allowlist` string[], required
  - `cloud_write_mode_available` boolean, required: Whether `write_mode = cloud` could be set right now. `false` is the normal state on an unlinked instance and must render as onboarding, not as an error.
  - `dead_lettered_spans` integer, required: Spans this instance accepted for this project and gave up on delivering. The instance-wide card only shows a count; this route is already scoped to one project, so it can say *why* without exposing another tenant's failures.
  - `delivery_failing` boolean, required: Whether delivery to Temps Cloud is failing for this project *now*: spans that already failed an attempt are still being retried. This, not `dead_lettered_spans`, is what decides whether the console shows an alert. Dead letters are a permanent record of a past loss and stay non-zero after the instance recovers; an alert driven by them tells a healthy instance it is broken, forever.
  - `delivery_failing_since` string, date-time, nullable: When the oldest span still being retried reached this instance.
  - `delivery_failure_action` string, nullable: What the operator has to do to end the failure, when it is something they can fix — today, re-enrolling after Cloud rejected the credential.
  - `delivery_failure_error` string, nullable: Why the most recent attempt failed, while `delivery_failing`.
  - `delivery_failure_setup_path` string, nullable
  - `delivery_gaps` CloudDeliveryGapResponse[], required: Past stretches of span time that were never delivered, newest first. Rendered as history, not as an alert.
    - `first_span_at` string, date-time, required: When the earliest undelivered span in this stretch reached the instance.
    - `gave_up_at` string, date-time, nullable: When delivery of the latest span in this stretch gave up — the same failure `last_error` describes.
    - `last_error` string, nullable: The instance's own bounded failure reason — never span content.
    - `last_span_at` string, date-time, required: When the latest one did. Traces between the two are incomplete.
    - `undelivered_spans` integer, required
  - `delivery_gaps_truncated` boolean, required: Whether older delivery gaps exist beyond the ones listed. Their spans are still counted in `dead_lettered_spans`, so a client can say how many older undelivered spans the list leaves out rather than presenting it as complete.
  - `effective_reason` 'operator' | 'cloud_disconnected' | 'quota_exhausted' | 'credential_rejected' | 'queue_overflow_spill' | 'cloud_recovered', nullable: Why an interval opened.
  - `effective_reason_message` string, nullable
  - `effective_write_mode` 'local' | 'cloud', required: Where this project's spans are going right now, which differs from `write_mode` during a quota or credential fallback.
  - `fidelity` 'metered' | 'queryable', required: Per-project fidelity tier for the optional Temps Cloud telemetry mirror.
  - `gap_windows` TelemetryGapWindowResponse[], required: Gap windows in the last 30 days.
    - `dropped_bytes` integer, required
    - `dropped_spans` integer, required
    - `ended_at` string, date-time, required
    - `message` string, required: The sentence shown to the operator. Sent by the server so the client never has to map an enum to prose and never renders a bare enum name.
    - `project_id` integer, required
    - `reason` 'operator' | 'cloud_disconnected' | 'quota_exhausted' | 'credential_rejected' | 'queue_overflow_spill' | 'cloud_recovered', required: Why an interval opened.
    - `started_at` string, date-time, required
  - `intervals` TelemetryWriteIntervalResponse[], required: The write-mode ledger, newest first.
    - `effective_from` string, date-time, required
    - `effective_to` string, date-time, nullable
    - `message` string, required
    - `mode` 'local' | 'cloud', required: Per-project destination for span writes.
    - `reason` 'operator' | 'cloud_disconnected' | 'quota_exhausted' | 'credential_rejected' | 'queue_overflow_spill' | 'cloud_recovered', required: Why an interval opened.
  - `last_dead_letter_at` string, date-time, nullable
  - `last_dead_letter_error` string, nullable: The reason the most recent give-up gave, if there is one. Delivery metadata only — this instance's own bounded error string. It is never the span payload, and this field must not become a place one appears.
  - `project_id` integer, required
  - `queued_spans` integer, required: Spans queued for Cloud for this project and not yet acknowledged.
  - `reason` string, nullable: The single most relevant missing prerequisite, when `cloud_write_mode_available` is false.
  - `retrying_spans` integer, required: Spans that failed at least one attempt and are still being retried.
  - `setup_path` string, nullable
  - `write_mode` 'local' | 'cloud', required: The operator's declared intent.

## Other responses

- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Project not found
- `409`: A prerequisite is missing
- `500`: Internal server error

## Changes

- **2026-11-09** `12896146b193`: 5 breaking
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
  - removed the required property `extensions` from the response with the `404` status
  - removed the required property `extensions` from the response with the `409` status
  - …1 more
- **2026-10-05** `4b228ebed583`: 13 info
  - added the optional property `delivery_failing_since` to the response with the `200` status
  - added the optional property `delivery_failure_action` to the response with the `200` status
  - added the optional property `delivery_failure_error` to the response with the `200` status
  - added the optional property `delivery_failure_setup_path` to the response with the `200` status
  - …9 more
- **2026-10-05** `63a80791dc58`: 4 breaking, 9 warning
  - removed the required property `delivery_failing` from the response with the `200` status
  - removed the required property `delivery_gaps` from the response with the `200` status
  - removed the required property `delivery_gaps_truncated` from the response with the `200` status
  - removed the required property `retrying_spans` from the response with the `200` status
  - …9 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/otel/cloud-telemetry/projects/:project_id/patch.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
