Closed Bug 1272345 Opened 9 years ago Closed 9 years ago

Gather Telemetry on URL redirects

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

(Whiteboard: [necko-active])

Attachments

(1 file, 1 obsolete file)

No description provided.
Assignee: nobody → ckerschb
Status: NEW → ASSIGNED
Whiteboard: [necko-active]
Valentin, I based my patch on HTTP_SCHEME_UPGRADE since it seems similar. I am not sure if we should include more status codes or just redirects. I personally only care about redirects, but let me know what you think.
Attachment #8751767 - Flags: review?(valentin.gosu)
Comment on attachment 8751767 [details] [diff] [review] bug_1272345_telemetry_url_redirects.patch Review of attachment 8751767 [details] [diff] [review]: ----------------------------------------------------------------- ::: netwerk/protocol/http/nsHttpChannel.cpp @@ +1611,5 @@ > bool saw_quic = (alt_protocol && PL_strstr(alt_protocol, "quic")) ? 1 : 0; > Telemetry::Accumulate(Telemetry::HTTP_SAW_QUIC_ALT_PROTOCOL, saw_quic); > + > + // Gather data on how many URLS get redirected > + switch(httpStatus) { Make this conditional on if Telemetry is enabled (similar to nsIOService). @@ +1628,5 @@ > + case 308: > + Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 4); > + break; > + default: > + break; Patrick suggests also adding buckets for: 304, 400, 401, 403, 404, 500 and one for "other"
Attachment #8751767 - Flags: review?(valentin.gosu) → feedback+
(In reply to Valentin Gosu [:valentin] from comment #2) > Make this conditional on if Telemetry is enabled (similar to nsIOService). It's already inside |if (gHttpHandler->IsTelemetryEnabled()) {| > Patrick suggests also adding buckets for: 304, 400, 401, 403, 404, 500 and > one for "other" Makes sense, will do.
Attachment #8751767 - Attachment is obsolete: true
Attachment #8751772 - Flags: review?(valentin.gosu)
Comment on attachment 8751772 [details] [diff] [review] bug_1272345_telemetry_url_redirects.patch Review of attachment 8751772 [details] [diff] [review]: ----------------------------------------------------------------- r=me with a minor nit. Thanks! ::: netwerk/protocol/http/nsHttpChannel.cpp @@ +1611,5 @@ > bool saw_quic = (alt_protocol && PL_strstr(alt_protocol, "quic")) ? 1 : 0; > Telemetry::Accumulate(Telemetry::HTTP_SAW_QUIC_ALT_PROTOCOL, saw_quic); > + > + // Gather data on how many URLS get redirected > + switch(httpStatus) { nit: space before (
Attachment #8751772 - Flags: review?(valentin.gosu) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Blocks: 1591131
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: