object metric: Add JOG support
Categories
(Data Platform and Tools :: Glean: SDK, enhancement, P2)
Tracking
(firefox137 fixed)
Tracking | Status | |
---|---|---|
firefox137 | --- | fixed |
People
(Reporter: janerik, Assigned: janerik)
References
Details
Attachments
(1 file, 1 obsolete file)
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•7 months ago
|
Assignee | ||
Comment 1•6 months ago
|
||
Now values set on runtime object metrics are checked against the provided schema.
We use jtd
- JSON type definitions - a schema definition similar to
json-schema, but much smaller in scope (RFC 8927).
We pull in the (official) jtd crate for that (it's rather small, ~1000 lines of code).
The schema is dumped into the jogfile and provided on instantiation in
the JOG code.
If that schema is defined at runtime values are checked.
That means there's one more runtime check, though that should be rather
cheap (and in code we can separate that case in the match
).
This now makes test_Glean.js
pass.
Not done yet: Check which other object
metric tests should be
re-enabled.
Assignee | ||
Comment 2•6 months ago
|
||
This makes it possible to instantiate object metrics using JOG.
This does NOT check values against the provided schema.
Thus while this enables object metrics, they behave slightly different
than the otherwise builtin ones:
set
and get
works as expected from JavaScript.
However on set
nothing is checked. You can set arbitrary values and
they will be recorded and returned.
Any error checking will fail.
With this change test_Glean.js
fails, because it not only checks the
positive case (setting an object works), but also the negative cases
(checking that an error is recorded when invalid objects are set).
Comment 3•6 months ago
|
||
Comment on attachment 9465116 [details]
WIP: Bug 1883857 - Enable schema-verification for runtime object metrics r?chutten!
Revision D237547 was moved to bug 1947194. Setting attachment 9465116 [details] to obsolete.
Updated•6 months ago
|
Comment 5•6 months ago
|
||
bugherder |
Comment hidden (Intermittent Failures Robot) |
Description
•