Closed Bug 1685406 Opened 4 years ago Closed 4 years ago

Implement the proposed Glean Interface for Firefox Telemetry (GIFFT)

Categories

(Toolkit :: Telemetry, enhancement, P1)

enhancement
Points:
3

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: chutten, Assigned: chutten)

References

(Blocks 1 open bug)

Details

(Whiteboard: [telemetry:fog:m?])

Attachments

(7 files)

Following the design proposed in bug 1681812 (proposal doc), implement the mirroring of Glean Metric Type API calls in C++ and JS to Telemetry APIs when the metrics have telemetry mirrors specified in their definitions in metrics.yaml.

Work will include:

  • Augmenting glean_parser to accept telemetry_mirror string fields and verify the mirrored metrics have a lifetime of ping
  • Adding the new Glean Metric ID -> Histogram/Scalar/Event ID maps/switchblocks to the glean_parser C++ code generator
  • Augmenting each Glean Metric Type in the MLA (toolkit/components/glean/bindings/private/) to check if there's a mirror and, if so, call the appropriate Telemetry APIs
    • Be careful about processes here.
  • Tests
  • Documentation in-tree, including a conversion guide
    • Be sure to highlight that this is a temporary measure to get us through Migration
Assignee: nobody → chutten
Status: NEW → ASSIGNED
Points: --- → 3
Priority: P3 → P1
Whiteboard: [telemetry:fog:m?]
Summary: Implement the proposed Glean API Frontend for Firefox Telemetry → Implement the proposed Glean Interface for Firefox Telemetry (GIFFT)

Additional requirement: Due to bug 1670261 stalled due to new gecko+nimbus+a-s+glean megazord proposal, this should also provide an ability to instrument using Glean APIs in C++/JS without Glean actually being present in the build. (Glean No-op or GNop)

As a result C++ and JS APIs and generated metrics will be unconditionally present in Gecko.

Depends on: 1695197

Depends on D109624

I tried my best to keep this self-contained so it'll be easy to remove.

Notes:

  • For all three Telemetry probe types we must generate new headers
    that map from metric id to mirrored probe id.
  • For events, note that we must generate a second file because of
    our strongly-typed enum class extra event keys in the C++ FOG
    Event API.
  • This is intended to work in situations where there is no Glean.
    This meant rewriting a few APIs to return monotonically-increasing
    ids instead of 0 in the event there is no SDK around to generate them.

Depends on D109627

Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/279347edf165 Fix incorrect comment. r=janerik https://hg.mozilla.org/integration/autoland/rev/96f79e770e74 Move EventExtraEntry to Telemetry.h r=janerik https://hg.mozilla.org/integration/autoland/rev/ae94785c583d Correct some now-incorrect FOG IPC docs on testing r=janerik https://hg.mozilla.org/integration/autoland/rev/e2c7170587f0 Clarify how new Glean metric types should architect themselves in FOG's MLA r=janerik https://hg.mozilla.org/integration/autoland/rev/6f6bf921bdc8 Glean Interface For Firefox Telemetry (GIFFT) r=janerik https://hg.mozilla.org/integration/autoland/rev/261f77f6af13 Add regression suite for GIFFT codegen. r=janerik
Blocks: 1701769
Regressions: 1701949
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: