Open
Bug 1880301
Opened 2 years ago
Updated 1 year ago
Consider capturing which uploader Glean.JS used in a metric
Categories
(Data Platform and Tools :: Glean: SDK, enhancement, P4)
Data Platform and Tools
Glean: SDK
Tracking
(Not tracked)
NEW
People
(Reporter: perry.mcmanis, Unassigned)
References
Details
In 1879400 we switched to a fallback uploader that can use either sendBeacon or fetch in Glean.JS
While looking at testing, it occurs that it would be nice, both for testing and also just for keeping track of how often sendBeacon fails in the wild, that we make a metric that keeps track of something to do with which uploader got used.
Comment 1•2 years ago
•
|
||
( Backlogging for bandwidth reasons. )
We discussed this in today's SDK meeting:
- Safe to backlog this as there's no immediate or external need as of yet
- Implementation possibilities
- An HTTP header. Pros: We already have one (
X-Telemetry-Agent) that kinda-sorta fits the bill. This is where information like this is "supposed" to go according to HTTP (e.g.User-Agent). The information rides with the ping upload that it describes. Cons: Not a metric, so harder to document and find and use (see alsoDateandX-Telemetry-Agentand friends). - A metric on the next ping of the same type. Pros: Is a metric (straightforward to add, use, discover). Cons: Is sent on the next ping (latency, incompleteness, difficult to join with affected ping)
- A metric on the "metrics" ping. Pros: Is how we currently do network health reporting, Is a metric. Cons: Is sent on a completely different ping (latency, hard to link to specific affected pings), not all applications send "metrics" pings (notably especially JS applications).
- We rejected the idea of making it a metric on the current ping. After ping assembly on submit() the payload is treated as immutable. Upload happens after (sometimes long after) the ping payload was assembled. Trying to unwrap the payload and inject more information into it is a) icky, b) hard, c) possibly impossible if we change the payload format between submission and upload (ie if an SDK update happens).
- An HTTP header. Pros: We already have one (
- Additional related work
- Recently we were asked how to determine which pings hadn't been able to be uploaded the first try or had been delayed on the client. The context was Firefox Desktop's
spocping, so it's not immediately relevant, but it's also asking about reporting network configuration and upload health. Satisfying this use case strongly suggests using HTTP headers to transmit the information (and internal metrics to store in the information), which lends more weight behind that potential design. But the request for information about retries has been satisfied, so this hasn't even been filed as a bug.
- Recently we were asked how to determine which pings hadn't been able to be uploaded the first try or had been delayed on the client. The context was Firefox Desktop's
- We resolved to scope this bug narrowly and avoid implementing a full network health reporting system to satisfy the original request. This bug is about designing and implementing a solution for identifying the uploader in use in any given ping uploaded from Glean.js applications or other instrumentation to aid understanding how often different uploaders fail.
Priority: -- → P4
You need to log in
before you can comment on or make changes to this bug.
Description
•