偵錯隱私權預算用盡錯誤

本指南說明如何使用匯總服務 (v2.12.0) 的全新隱私權預算偵錯功能,找出 PRIVACY_BUDGET_EXHAUSTED 錯誤。如文件所述,雖然可匯總報表是透過工作提交至匯總服務的部署作業,但基礎架構會依賴 TEE (可信任的執行環境) 協調器中的可匯總報表帳戶服務,來限制隱私權預算用量。提醒您,隱私權預算會決定這些可匯總報表可用於產生摘要報表的次數上限,以限制資訊量。如果報表的匯總結果超出分配的隱私權預算,系統會傳回 PRIVACY_BUDGET_EXHAUSTED 錯誤。

本指南將逐步說明如何使用偵錯功能。這項功能會產生並儲存相關報表的輔助 JSON 檔案,這些報表會導致作業發生後續的 PRIVACY_BUDGET_EXHAUSTED 錯誤。這項功能自 v2.12.0起推出。

如要瞭解預算復原,請參閱 GitHub 上的公開指南

先決條件

繼續操作即表示您已具備下列條件:

偵錯因 PRIVACY_BUDGET_EXHAUSTED 錯誤而失敗的工作

此時,我們預期您已使用最新的工作要求 ID 執行 getJob 端點,並收到類似下列回應的 PRIVACY_BUDGET_EXHAUSTED 錯誤。在匯總服務 v2.12.0中,您應該會在公開雲端儲存空間 bucket 中,看到新產生的隱私權預算用盡偵錯 JSON 檔案。

路徑由 return_message 陳述,並採用下列格式:

  • 檔案路徑:<output_data_bucket_name>/<output_data_blob_prefix>/
  • 檔案名稱:privacy_budget_exhausted_<request_received_at_timestamp>.json
{
  "job_status": "FINISHED",
  "request_received_at": <utc timestamp>,
  "request_updated_at": <utc timestamp>,
  "job_request_id": <customer assigned job id>,
  
  "request_processing_started_at": <utc timestamp>,
  "result_info": {
    "return_code": "PRIVACY_BUDGET_EXHAUSTED",
    "return_message": "com.google.aggregate.adtech.worker.exceptions.AggregationJobProcessException: Insufficient privacy budget for one or more aggregatable reports. No aggregatable report can appear in more than one aggregation job. Information related to reports that do not have budget can be found in the following file:
    File path: ags-privacy-budget-codelab/output-bucket/output-domain Filename: privacy budget exhausted debugging information <utc timestamp> \n com.google.aggregate.adtech.worker.aggregation.concurrent.ConcurrentAggregationProcessor.consumePrivacyBudgetUnits(ConcurrentAggregationProcessor.java:525) \n com.google.aggregate.adtech.worker.aggregation.concurrent.ConcurrentAggregationProcessor.process(ConcurrentAggregationProcessor.java:319) \n com.google.aggregate.adtech.worker.WorkerPullWorkService.run(WorkerPullWorkService.java:157)",
    "error_summary": {
      "error_counts": "",
      "error_messages": ""
    }
  }
}

錯誤解決步驟

找出並開啟公開雲端儲存空間 bucket 中提供的 privacy_budget_exhausted_debugging_information_<utc timestamp>.json 輸出內容。這項資訊位於 return_message 中提供的路徑 <output_data_bucket_name>/<output_data_blob_prefix>。在該 JSON 檔案中,將 filtering_id (預設為 0) 和 relevant_shared_info 屬性與輸入的可匯總報表 shared_info 進行比較。如果找到相符項目,表示這些報表超出分配的預算,導致工作失敗,因此日後的工作必須將這些項目排除。請注意,相符的報表仍可搭配其他篩選 ID 重複使用。從批次報表 AVRO 檔案中找出並移除相符的報表後,即可重新執行工作。

以下是 privacy_budget_exhausted_debugging_information_<utc timestamp>.json 輸出內容的範例。

{
 "privacy_budget_exhausted_info" : {
   "aggregatable_input_budget_consumption_info" : [ {
     "aggregateable_input_budget_id" : {
       "filtering_id" : 0,
       "relevant_shared_info" : {
         "api" : "attribution-reporting",
         "attribution_destination" : "f246a4e6-dde9-46a5-a6b2-ea523b484d0a",
         "reporting_origin" : "foo.com",
         "scheduled_report_time" : 1738814400.000000000,
         "source_registration_time" : 1738713600.000000000,
         "version" : "0.1"
       }
     }
   }, {
       "aggregateable_input_budget_id" : {
       "filtering_id" : 0,
       "relevant_shared_info" : {
         "api" : "attribution-reporting",
         "attribution_destination" : "f246a4e6-dde9-46a5-a6b2-ea523b484d0a",
         "reporting_origin" : "foo.com",
         "scheduled_report_time" : 1738796400.000000000,
         "source_registration_time" : 1738713600.000000000,
         "version" : "0.1"
       }
     }
   } ]
 }
}

後續步驟

前往 Privacy Sandbox 狀態資訊主頁公開 GitHub 存放區,確認是否有其他人遇到相同問題。 如果無法解決匯總服務問題,請提出 GitHub 問題或提交技術支援表單