gecko-dev/toolkit/components/glean/bindings
Jan-Erik Rediger 8321cd2247 Bug 1693486 - Implement new event extra API. r=chutten
This drops the _old_ API fully and implements support only for the new object-focused API,
regardless of `type` defintions in metrics.yaml.

The new API will look like the following examples:

Rust

    let extra = AnEventKeys {
        extra1: Some("a-value".into()),
        ..Default::default()
    };
    category::an_event.record(extra);

(Note: not optimal yet, but we can extend this with a builder-like
pattern later)

C++

    AnEventExtra extra = { .extra1 = Some("value"_ns) };
    category::an_event.Record(Some(extra));

JavaScript (actually unchanged!)

    let extra = { extra1: "value" };
    Glean.category.anEvent.record(extra);

(Note: The JavaScript API accepts strings, booleans and integers for any
extra value and will stringify them regardless of their specified type.)

Differential Revision: https://phabricator.services.mozilla.com/D114498
2021-06-02 16:07:56 +00:00
..
private Bug 1693486 - Implement new event extra API. r=chutten 2021-06-02 16:07:56 +00:00
Category.cpp
Category.h Bug 1673931 - Avoid including BindingDeclarations.h from header files. r=nika 2021-03-04 14:32:14 +00:00
Glean.cpp
Glean.h Bug 1673931 - Avoid including BindingDeclarations.h from header files. r=nika 2021-03-04 14:32:14 +00:00
GleanPings.cpp Bug 1673660 - C++ and JS API for Glean Custom Pings r=janerik,webidl,smaug 2020-12-14 16:50:07 +00:00
GleanPings.h Bug 1673660 - C++ and JS API for Glean Custom Pings r=janerik,webidl,smaug 2020-12-14 16:50:07 +00:00
MetricTypes.h Bug 1704846 - Add Quantity metric type to FOG (C++, JS) r=janerik 2021-04-21 15:40:47 +00:00