本指南介绍了如何使用新的隐私保护预算调试功能来解决 PRIVACY_BUDGET_EXHAUSTED 错误。该功能自 v2.12.0 起已在汇总服务中提供。如文档中所述,虽然可汇总报告是通过作业提交到 Aggregation Service 的部署中,但该基础架构依赖于位于 TEE(可信执行环境)协调器中的可汇总报告账号服务来限制隐私预算使用情况。请注意,隐私预算决定了这些可汇总报告可用于生成摘要报告的最大次数,以限制信息增益。任何超出报告分配的隐私预算的汇总都会失败,并显示 PRIVACY_BUDGET_EXHAUSTED 错误。
本指南将引导您了解一项调试功能,该功能自 v2.12.0 起可生成并存储一个辅助 JSON 文件,其中包含促成作业后续发生的任何 PRIVACY_BUDGET_EXHAUSTED 错误的相关报告。
如果您对预算恢复感兴趣,请继续查看我们在 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": ""
}
}
}
错误解决步骤
找到并打开您的公共云存储分区中提供的 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 问题或提交技术支持表单。