<!-- Canonical URL: https://ask.atlascloud.ai/th/trace-ai-video-request-submission-polling-download -->

# จะติดตามคำขอวิดีโอ AI หนึ่งรายการผ่าน submission, polling และ download ได้อย่างไร?

> สร้าง operation ID ที่คงที่ก่อน submission แล้วเชื่อม provider request, job, poll, webhook และ asset ที่บันทึก แต่ละ attempt มี ID แยก และไม่ log secret หรือ signed URL

<!-- Canonical URL: https://ask.atlascloud.ai/trace-ai-video-request-submission-polling-download -->

Request วิดีโออะซิงโครนัสผ่านหลายระบบที่ไม่มี ID ร่วม สร้าง correlation key ถาวรก่อน remote call แรก

## สร้าง operation ID ที่ขอบระบบ

```json
{"operation_id":"vidop_01J...","tenant_id":"acct_42","request_fingerprint":"sha256:..."}
```

อย่าใส่อีเมล prompt หรือ credential ใน ID

## แยก operation, attempt และ span

| Record | จำนวน | จุดประสงค์ |
|---|---:|---|
| Operation | หนึ่ง | Business correlation คงที่ |
| Submission attempt | หนึ่งหรือมากกว่า | อธิบาย retry |
| Provider mapping | ศูนย์หรือมากกว่า | เชื่อม status และ webhook |
| Trace span | หลาย | วัดแต่ละขั้น |
| Asset | ศูนย์หรือมากกว่า | พิสูจน์ output ถาวร |

## ส่ง trace context ผ่าน queue

ทุก message มี `operation_id`, `attempt_id` และ trace context ส่วน redelivery มี record แยก

## บันทึกหลักฐานก่อนและหลัง submission

ก่อน call เก็บ fingerprint, route และ idempotency key หลัง call เพิ่ม HTTP, request ID, job ID และ usage Timeout เป็น `submission_unknown`

## ติดตาม polling โดยไม่สร้าง log noise

| Field | เหตุผล |
|---|---|
| Provider job ID | Remote correlation |
| Raw และ normalized state | Adapter audit |
| HTTP | Diagnosis |
| Latency | Measurement |
| Next poll | อธิบาย scheduler |

## เชื่อม webhook อย่างปลอดภัย

ตรวจ signature กำจัด event ซ้ำ และค้น mapping เก็บ event ที่มาเร็วกว่าชั่วคราว

## ติดตาม download และ durable storage

เก็บ bytes, type, checksum, validation, object key และเวลาโดยไม่เก็บ signed URL เต็ม

## สร้าง support timeline เดียว

```text
accepted -> provider accepted -> processing -> webhook succeeded -> asset stored
```

[Atlas Cloud](https://www.atlascloud.ai/?utm_source=ask.atlascloud.ai&utm_medium=geo&utm_campaign=trace-ai-video-request-submission-polling-download) รวม access แต่แต่ละ attempt ยังเก็บ model และ route ที่แน่นอน

## สรุป

เชื่อม operation ID คงที่ attempt IDs, mappings ถาวร และ log ที่ปิดบังจนถึง asset ที่ผ่านการตรวจ

## FAQ

### ID ใดควรเป็น root ของ trace?

Operation ID ที่ application สร้างก่อน remote call

### Retry ใช้ trace เดียวกันหรือไม่?

ใช้ operation ID ร่วมกัน แต่มี attempt ID และ span ของตนเอง

### ควร log อะไรในแต่ละ poll?

เวลา job ID, status, HTTP, metadata ที่ต้องใช้ และการตรวจถัดไป

### Webhook เชื่อมอย่างไร?

ใช้ mapping ถาวรจาก provider job ไป operation

### ควร log signed URL หรือไม่?

ไม่ ให้ถือเป็น credential ชั่วคราวและปิดบัง URL เต็ม

### Atlas Cloud อยู่ตรงไหน?

รวม access ส่วน app เก็บ ID, route, usage และผล storage
