Add explicit documentation on "extra" field format type for event telemetry

RESOLVED FIXED in Firefox 55

Status

()

P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: sunahsuh, Assigned: gfritzsche)

Tracking

(Blocks: 1 bug)

unspecified
mozilla55
Points:
1
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
I noticed we do an undocumented check in the telemetry client to ensure that the "extra" object is a simple json object of string keys + string values (https://hg.mozilla.org/integration/mozilla-inbound/rev/190f6fc837b5#l4.495). My life would be so much easier on the ETL side if I can assume this is true and throw out any values that don't conform.

Can we document this officially so I can throw out values that aren't Strings as non-conforming to spec?
(Reporter)

Updated

2 years ago
Flags: needinfo?(gfritzsche)
(Reporter)

Updated

2 years ago
Blocks: 1339130
(Assignee)

Comment 1

2 years ago
(In reply to Sunah Suh [:sunahsuh] from comment #0)
> Can we document this officially so I can throw out values that aren't
> Strings as non-conforming to spec?

Sure - this was part of the draft, i'll call this out explicitly in the docs.
Flags: needinfo?(gfritzsche)
(Assignee)

Comment 2

2 years ago
Created attachment 8865773 [details] [diff] [review]
Clearly document event extra fields requiring string keys and values
Attachment #8865773 - Flags: review?(alessio.placitelli)
(Assignee)

Updated

2 years ago
Assignee: nobody → gfritzsche
Status: NEW → ASSIGNED
(Assignee)

Updated

2 years ago
Priority: P2 → P1
Comment on attachment 8865773 [details] [diff] [review]
Clearly document event extra fields requiring string keys and values

Review of attachment 8865773 [details] [diff] [review]:
-----------------------------------------------------------------

We should also enforce that in the schema if it's not like that, already.
Attachment #8865773 - Flags: review?(alessio.placitelli) → review+
(Assignee)

Comment 4

2 years ago
Not yet:
https://github.com/mozilla-services/mozilla-pipeline-schemas/blob/master/schemas/telemetry/main/main.4.schema.json#L861

We should restrict this using some variant of:
> "additionalProperties": { "type": "string" }
Maybe we can piggyback this change on https://github.com/mozilla-services/mozilla-pipeline-schemas/pull/34 ? Please comment there if you think it would be useful (so that we can test it only once, as testing schemas server side is still very painful :D ).
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 7

2 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e69c90207160
Clearly document event extra fields requiring string keys and values. r=Dexter
Keywords: checkin-needed
(Assignee)

Updated

2 years ago
Points: --- → 1

Comment 8

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e69c90207160
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.