Enable schema-verification for runtime object metrics
Categories
(Data Platform and Tools :: Glean: SDK, defect)
Tracking
(Not tracked)
People
(Reporter: janerik, Unassigned)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
bug 1883857 implements basic support for object metrics in JOG, so they are somewhat usable in artifact builds.
But it lacks the schema verification on set
.
This bug is about adding runtime schema verification.
Reporter | ||
Comment 1•14 days 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.
Description
•