Append "event_id" by which "Chrome Reporting API" deduplicates events.
event_id is calculated by taking a hash from (event, context) pair. Both event and context are flat dictionaries, they contain only primitive types. Inside base::DictionaryValue is implemented with flat_map which stores keys in sorted vector. This gives a stable result when serializing to json string. Hash will be calculated from those stable json strings, which gives stable hashes. Bug: 996213 Change-Id: I2c88ab709bc78dd54471185e52e99a62054752de Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1783145 Commit-Queue: Askar Aitzhan <askaraitzhan@google.com> Reviewed-by:Sergey Poromov <poromov@chromium.org> Cr-Commit-Position: refs/heads/master@{#694301}
Showing
Please register or sign in to comment