
Phân tích yêu cầu
- Ứng dụng web chạy trên Azure Web App và sử dụng Azure SQL Database + Azure Storage.
- Gửi HTTP requests đến các dịch vụ bên ngoài.
- Đã tích hợp Application Insights để theo dõi hoạt động.
- Các dịch vụ bên ngoài tuân theo OpenTelemetry (chuẩn mở để quan sát hệ thống).
- Yêu cầu: Gán customer ID của người dùng đăng nhập với mọi thao tác trong toàn bộ hệ thống.
Phân tích các lựa chọn
Lựa chọn | Phân tích | Chọn không? |
---|---|---|
A. Add the customer ID for the signed-in user to the CorrelationContext in the web application. | ||
B. On the current SpanContext, set the TraceId to the customer ID for the signed-in user. | ||
C. Set the header Ocp-Apim-Trace to the customer ID for the signed-in user. | ||
D. Create a new SpanContext with the TraceFlags value set to the customer ID for the signed-in user. |
Đáp án chính xác
Chọn A: Add the customer ID to CorrelationContext
Đây là cách đúng nhất để gán Customer ID với mọi hoạt động trong hệ thống!