Closed Bug 1875816 Opened 1 year ago Closed 1 year ago

Event stream: make non-event metrics accessible in event stream table

Categories

(Data Platform and Tools :: Glean Platform, task)

task

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: janerik, Assigned: janerik)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We should make non-event metrics accessible in the event stream table.
Some apps do set them.
Luckily it's often the case that they send only one event per ping, so metrics apply as is and are either app or ping lifetime.

After talking with wil: We could merge all metrics into the event extra as JSON.
Would need another UDF, e.g. https://sql.telemetry.mozilla.org/queries/96989/source

Back in the proposal we called them out as a separate column.

As a structured column this would require us to list out the schema for each table. That doesn't seem good.
We essentially have two options:

  1. Merge all of metrics converted to JSON into event_extra
  2. Have a new column metrics, JSON type, and store mozfun.json.to_map(metrics) in there. That way it's easily accessible, same as the event extras

:wil, thoughts?

Flags: needinfo?(wstuckey)

After talking with will we're going with a JSON column metrics, done by TO_JSON(metrics) from the original table.

Flags: needinfo?(wstuckey)
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Blocks: 1879039
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: