ccf-log-tail — text log sink Authenticated endpoints (Authorization: Bearer $LOG_TAIL_TOKEN or x-log-tail-token: $LOG_TAIL_TOKEN): POST /log[/:channel] body= append one line POST /v1/logs OTLP/HTTP Logs Cloudflare Destination receiver POST /v1/traces OTLP/HTTP Traces AI Gateway OTEL receiver GET /tail[/:channel] full buffer GET /tail[/:channel]/meta buffer window + line count GET /trace/run/:id merged trace for one run GET /trace/task/:id merged trace for one task GET /trace/receipt/:id merged trace for one receipt GET /tail?since= lines since timestamp GET /tail?n= last N lines GET /stream[/:channel] SSE live tail POST /archive/run manual archive to R2 (emergency only) Channels are arbitrary strings (e.g. main, ccf-claw, ccf-google-mcp). OTLP Logs auto-route records to channels named after resource.service.name. OTLP Traces from AI Gateway are normalized into the "aig" channel. Primary storage: R2 immutable shards via queue (logs/{channel}/YYYY/MM/DD/...). Live tail buffer: in-memory DO ring (2 MB, volatile on eviction). Example tail: curl -N -H "Authorization: Bearer $T" https://ccf-log-tail..workers.dev/stream/ccf-claw Cloudflare Destination config: Type: Logs OTLP Logs Endpoint: https://ccf-log-tail..workers.dev/v1/logs Custom header (preferred for AI Gateway OTEL): x-log-tail-token = Alternate header: Authorization = Bearer