Design and Implement C++ and JS APIs for Pings
Categories
(Toolkit :: Telemetry, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: chutten, Assigned: chutten)
References
Details
(Whiteboard: [telemetry:fog:m6])
Attachments
(2 files)
Loosely following the docs, implement the C++ and JS APIs for Pings.
This will mark the first time that C++ can submit pings in Firefox without spawning a pingsender process!
Assignee | ||
Comment 1•4 years ago
|
||
Note that this also requires writing the code generation templates for Pings in JS and C++. There is no design covering this, so we'll also need at least a micro-proposal design for them, too.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
•
|
||
Don't forget to update the test landing in bug 1675114 ( Actually, nevermind. bug 1675114 can't be tested that way because the ping object is never instantiated which means it's never registered which means it can't be sent.test_fog_custom_ping.py
) when the JS API lands.
Assignee | ||
Comment 3•4 years ago
|
||
Current straw design:
- JS will add a new global
GleanPings
which will have the registered pings available via named getter a la categories on the global Glean - C++ will use the namespace
mozilla::glean_pings
with the Ping objects available therein. - The ping objects in C++ will hold ids for MLA FFI. We'll need to generate string tables and PingId tables like we do for metrics.
- We need to add
pings_test_output
s for cpp and js to our pytests
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
Headers we want our consumers to use remain in mozilla/glean,
but scaffolding now lives in mozilla/glean/bindings.
This will allow me to have a binding for the GleanPings global in GleanPings.h
AS WELL AS a GleanPings.h which is the C++ consumer API for custom pings.
Assignee | ||
Comment 5•3 years ago
|
||
Covers adding the new JS global GleanPings
for JS, the new structs for C++ at
mozilla::glean_pings, ping-id and string-table-index codegen, the usual
boilerplate for JS and C++ stuff, and tests.
Unresolved:
- What happens if we call this on a non-parent process?
(This isn't a supported mode of operation)
Depends on D98670
Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/551fd43769ca Move FOG C++ and JS API scaffolding headers to subdir r=janerik https://hg.mozilla.org/integration/autoland/rev/f6c62f38a583 C++ and JS API for Glean Custom Pings r=janerik,webidl,smaug
Comment 7•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/551fd43769ca
https://hg.mozilla.org/mozilla-central/rev/f6c62f38a583
Description
•