本指南介绍了如何使用从 v2.12.0
开始在汇总服务中提供的新隐私预算调试功能来处理 PRIVACY_BUDGET_EXHAUSTED
错误。如文档所述,虽然可汇总的报告会通过作业提交到 Aggregation Service 部署,但该基础架构依赖于位于 TEE(可信执行环境)协调程序中的可汇总报告账号服务,以限制隐私预算用量。请注意,隐私预算决定了这些可汇总报告可用于生成摘要报告的次数上限,以限制信息获取量。如果报告的任何汇总超出其分配的隐私预算,则会失败并返回 PRIVACY_BUDGET_EXHAUSTED
错误。
本指南将向您介绍一项调试功能,该功能从 v2.12.0
开始,会生成并存储一个包含导致作业出现任何后续 PRIVACY_BUDGET_EXHAUSTED
错误的相关报告的辅助 JSON 文件。
如果您对预算恢复感兴趣,请继续参阅 GitHub 上的公开指南
先决条件
本指南假定您已完成以下操作:
- 在您选择的公有云(Google Cloud Platform 或 Amazon Web Services)上部署的汇总服务
v2.12.0
(或更高版本)。
调试因 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": ""
}
}
}
错误解决步骤
在您的公共 Cloud Storage 存储分区中找到并打开为您提供的 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 问题或提交技术支持表单。