偵錯隱私權預算用盡錯誤

本指南說明如何針對 v2.12.0 起在匯總服務中提供的 PRIVACY_BUDGET_EXHAUSTED 錯誤,使用新的隱私權預算偵錯功能。如同說明所述,雖然匯總報表會透過工作提交至匯總服務的部署作業,但基礎架構會依賴位於 TEE (可信執行環境) 協調器中的匯總報表帳戶服務,以限制隱私預算用量。提醒您,隱私權預算會決定這些可匯總報表可用於產生摘要報表的次數上限,以限制資訊獲取量。任何超出指派隱私公開程度上限的報表匯總作業都會失敗,並顯示 PRIVACY_BUDGET_EXHAUSTED 錯誤。

本指南將逐步引導您使用偵錯功能,該功能會在 v2.12.0 產生並儲存輔助 JSON 檔案,其中包含與工作發生的後續 PRIVACY_BUDGET_EXHAUSTED 錯誤相關的報告。

如果您想瞭解預算回復,請參閱我們在 GitHub 上的公開指南

先決條件

繼續閱讀本指南即表示您已具備下列條件:

對發生 PRIVACY_BUDGET_EXHAUSTED 錯誤而失敗的工作進行偵錯

此時,您應該已使用最新的工作要求 ID 執行 getJob 端點,並收到類似下列回應的 PRIVACY_BUDGET_EXHAUSTED 錯誤。從匯總服務 v2.12.0 中,您應該會在公開雲端儲存空間值區中,看到新產生的隱私權預算用盡偵錯 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": ""
    }
  }
}

錯誤解決步驟

找出並開啟您在公開雲端儲存值區中提供的 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 問題或技術支援表單