공유 저장소 및 비공개 집계 디버깅

디버깅을 사용 설정하려면 공유 저장소 및 비공개 집계가 사용되는 동일한 컨텍스트에서 enableDebugMode() JavaScript 메서드를 호출합니다. 이는 동일한 컨텍스트의 향후 보고서에 적용됩니다.

privateAggregation.enableDebugMode();

보고서를 트리거한 컨텍스트와 연결하려면 JavaScript 호출에 전달되는 64비트 부호 없는 정수 디버그 키를 설정하면 됩니다. debugKeyBigInt입니다.

privateAggregation.enableDebugMode({debugKey: 1234});

공유 저장소 디버그

Shared Storage가 다음과 같은 일반 오류 메시지를 반환합니다.

Promise is rejected without and explicit error message

호출을 try-catch 블록으로 래핑하여 공유 저장소를 디버그할 수 있습니다.

try {
  privateAggregation.contributeToHistogram({bucket, value});
} catch (e){
  console.log(e);
}

비공개 집계 디버그

보고서는 /.well-known/private-aggregation/report-shared-storage/.well-known/private-aggregation/debug/report-shared-storage로 전송됩니다. 디버그 보고서는 다음 JSON과 유사한 페이로드를 수신합니다. 이 페이로드는 api 필드를 'shared-storage'로 정의합니다.

{
   "aggregation_coordinator_origin": "https://publickeyservice.msmt.gcp.privacysandboxservices.com",
   "aggregation_service_payloads": [ {
      "debug_cleartext_payload": "omRkYXRhlKJldmFsdWVEAAAAgGZidWNrZXRQAAAAAAAAAAAAAAAAB1vNFaJldmFsdWVEAAAAAGZidWNrZXRQAAAAAAAAAAAAAAAAAAAAAKJldmFsdWVEAAAAAGZidWNrZXRQAAAAAAAAAAAAAAAAAAAAAKJldmFsdWVEAAAAAGZidWNrZXRQAAAAAAAAAAAAAAAAAAAAAKJldmFsdWVEAAAAAGZidWNrZXRQAAAAAAAAAAAAAAAAAAAAAKJldmFsdWVEAAAAAGZidWNrZXRQAAAAAAAAAAAAAAAAAAAAAKJldmFsdWVEAAAAAGZidWNrZXRQAAAAAAAAAAAAAAAAAAAAAKJldmFsdWVEAAAAAGZidWNrZXRQAAAAAAAAAAAAAAAAAAAAAKJldmFsdWVEAAAAAGZidWNrZXRQAAAAAAAAAAAAAAAA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teBR/iknZFcc1w3caQBhgRl5jt8DbaOzYcW4690H8Ul4Oh2wRO+6/njifk+pExLay/O5swLi2lUUph5OUEaaztwwzh2mnhwIBxMkPnfsGihiF+5KDEajVfMZ3NLsIDoZO+l4RTZrkqE+jVkAqaZGBiCIx42Edp/JV0DXfrryypCdQBZr8iEbSzCM9hKsMfLN7S/VkPe5rDwOZbhKCn5XXgfGz5tSx/KbZgsQf4OCEhwAyNPHAh3MHU7xmkQ3pKg4EIUC/WOtKAlVDOtDMmPPoQY1eAwJhw9SxZaYF1kHjUkTm3EnGhgXgOwCRWqeboNenSFaCyp6DbFNI3+ImONMi2oswrrZO+54Tyhca5mnLIiInI+C3SlP4Sv1jFECIUdf/mifJRM5hMj6OChzHf4sEifjqtD4A30c4OzGexWarie2xakdQej9Go4Lm0GZEDBfcAdWLT9HwmpeI2u4HDAblXDvLN8jYFDOOtzOl90oU7AwdhkumUCFLRadXAccXW9SvLfDswRkXMffMJLFqkRKVE1GPonFFtlzaRqp7IgE8L6AOtz6NDcxAjHnEuzDPPMcWMl1AFH0gq7h"
   } ],
   "debug_key": "1234",
   "shared_info": "{\"api\":\"shared-storage\",\"debug_mode\":\"enabled\",\"report_id\":\"80d93c0a-a94e-4ab7-aeb5-a4ecd4bfc598\",\"reporting_origin\":\"https://privacy-sandbox-demos-dsp.dev\",\"scheduled_report_time\":\"1717784740\",\"version\":\"0.1\"}"
}

일반 텍스트 페이로드 디버그

debug_cleartext_payloadBase64 CBOR로 인코딩됩니다. 디코더를 사용하여 버킷과 값을 보거나 공유 저장소 디코더에 있는 JavaScript 코드를 사용할 수 있습니다.

참여 및 의견 공유

공유 저장용량 제안은 현재 논의 중이며 변경될 수 있습니다. 있습니다. 이 API를 사용해 보고 의견이 있으면 언제든지 알려 주세요.