Closed Bug 1530481 Opened 1 year ago Closed 1 year ago

Implement a Firefox Origin Telemetry skeleton

Categories

(Toolkit :: Telemetry, enhancement, P1)

enhancement
Points:
3

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: chutten, Assigned: chutten)

References

Details

Attachments

(4 files)

This bug is about learning how well the proposed design of Firefox Origin Telemetry (bug 1522660) works when we try to turn it into a concrete implementation.

This skeleton will have:

  • An API (which we hope to keep stable as we move forward with implementation)
  • A data storage mechanism
  • The ability to prio-encode information to a payload
  • Only enough tests to convince myself that it works
  • A list of fake origins

This skeleton does not need to have:

  • A ping assembly, scheduling, and sending mechanism (because I'm rather practised at this part already)
  • Any way to snapshot the plaintext or encoded data (because that's only needed by tests, about:telemetry, and ping assembly)
  • The rest of the tests
  • about:telemetry support
  • The actual list of supported origins

Questions we hope this exercise will help answer:

  • In what language should the API and data storage portions be written?
  • Are any aspects of the design proposal under-specified? Turn out to be wrong?

Depends on D21756

Attachment #9048556 - Attachment description: Bug 1530481 - [WIP] Test Firefox Origin Telemetry. → Bug 1530481 - Test Firefox Origin Telemetry.

For some reason Telemetry's gtests doesn't like one or more of the dependencies
of mprio.h, so I had to move it into PrioEncoder's cpp and forward declare the
PublicKey typedefs.

It isn't the cleanest, but I'm surprised C++ let me off with just that level
of nonsensery.

Depends on D22119

The threading and promise handling is kept at the TelemetryImpl level
deliberately to facilitate testing. It also turns out that hangs/modules do
more-or-less the same split for their off-thread collection, so in
retrospect it is the obvious choice.

For the batch ID we're using the app build id as discussed.

Depends on D22605

Attachment #9047797 - Attachment description: Bug 1530481 - Sketch out Firefox Origin Telemetry's impl. → Bug 1530481 - Sketch out Firefox Origin Telemetry's impl. r?janerik
Attachment #9048556 - Attachment description: Bug 1530481 - Test Firefox Origin Telemetry. → Bug 1530481 - Test Firefox Origin Telemetry. r?janerik
Attachment #9049344 - Attachment description: Bug 1530481 - Refactor PrioEncoder to be usable from C++. → Bug 1530481 - Refactor PrioEncoder to be usable from C++. r?rhelmer
Attachment #9049345 - Attachment description: Bug 1530481 - Support encoded snapshots in Firefox Origin Telemetry. → Bug 1530481 - Support encoded snapshots in Firefox Origin Telemetry. r?janerik
Blocks: 1536565
Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0ada21a3af93
Sketch out Firefox Origin Telemetry's impl. r=janerik
https://hg.mozilla.org/integration/autoland/rev/1dab9495422d
Test Firefox Origin Telemetry. r=janerik
https://hg.mozilla.org/integration/autoland/rev/171275cc24fb
Refactor PrioEncoder to be usable from C++. r=rhelmer
https://hg.mozilla.org/integration/autoland/rev/304549224738
Support encoded snapshots in Firefox Origin Telemetry. r=janerik

Ack, missed gBatchID's buffer and gOriginsList's nsTArray_base.

New patches put them on the heap and manage them explicitly. I guess I'll work on moving them to definitions files next so I can generate them at build time instead of putting them on the heap.

Flags: needinfo?(chutten)
Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a032ef105979
Sketch out Firefox Origin Telemetry's impl. r=janerik
https://hg.mozilla.org/integration/autoland/rev/9cdc1c4c026b
Test Firefox Origin Telemetry. r=janerik
https://hg.mozilla.org/integration/autoland/rev/70d73a31d22a
Refactor PrioEncoder to be usable from C++. r=rhelmer
https://hg.mozilla.org/integration/autoland/rev/91a4fa9c15a8
Support encoded snapshots in Firefox Origin Telemetry. r=janerik
Blocks: 1533363
No longer blocks: 1533363
Blocks: 1539536
You need to log in before you can comment on or make changes to this bug.