New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 849127 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

HTTP Fallback for Metrics Upload breaks UMA Local Collector

Project Member Reported by rushikesh@chromium.org, Jun 3 2018

Issue description

Chrome Version       : 67.0.3396.62
OS Version: 
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari:
    Firefox:
    IE/Edge:

What steps will reproduce the problem?
1. Start UMA Local Collector
2. Attempt to upload UMA metrics to that collector. 
3. 

What is the expected result?
Metrics should be received and logged to the directory specified.

What happens instead of that?
Metric hashes mismatch, causing the UMA renderer to throw away the metric.

Please provide any additional information below. Attach a screenshot if
possible.

https://cs.chromium.org/chromium/src/components/metrics/net/net_metrics_log_uploader.cc?rcl=cf4fca0e485bf1bd1cec4077c3d4ea2cf2dc2d83&l=199

UserAgentString: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36



 
For UMA local collector, we need to build with --enable_http_log_decryption=false, but this doesn't play nicely with the HTTP fallback.
Labels: Needs-Triage-M67
Cc: pbomm...@chromium.org
Labels: Triaged-ET TE-NeedsTriageHelp
rushikesh@ Thanks for the issue.

As starting UMA Local Collector is out of scope of triaging at TE end, adding 'TE-NeedsTriageHelp' for further help in triaging the issue.

Thanks..
Labels: -Pri-1 -TE-NeedsTriageHelp -Triaged-ET -Needs-Triage-M67 M-69 Pri-2
Status: Assigned (was: Unconfirmed)
This issue does not need additional triage. Removing labels about it.

carlosil: This is similar to the issue you fixed with variations requests - if a user is manually specifying an HTTP URL, it's likely for local testing and thus we shouldn't try to encrypt. Or perhaps the logic can be around localhost URLs.
Status: Started (was: Assigned)
We don't have an actual flag for setting the UMA URL like we do for Variations, do we? (I only found override-metrics-upload-url https://cs.chromium.org/chromium/src/chromecast/base/chromecast_switches.cc?rcl=aba0b973912a614a68d91bff03340724547b20d5&l=27 but that seems chromecast specific).

I was trying to avoid doing a special case for localhost, since that will complicate testing decryption with a local collector, but without a flag seems like the only way to do it. Would it make sense to add something like --metrics-server-url? That way I could add separate flags for a 'secure' url that doesn't trigger decryption, and an 'insecure' one that does, how does that sound? Otherwise I'll go with the localhost approach.

(While we decide and I land the fix, the easiest way to disable encryption for testing is to remove everything inside this if block https://cs.chromium.org/chromium/src/components/metrics/net/net_metrics_log_uploader.cc?rcl=0da87314da6b638c939493e02e86752d29aa8a73&l=199) 
Hmm, I guess it's true that we don't let UMA URL to be overridden, which makes sense because it's something we don't want to be done by end users.

However, some other products like cast allow this from their test builds. Seems the localhost solution is easiest.
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0181723ea9ed937a6cacb2c44af15db23abe0107

commit 0181723ea9ed937a6cacb2c44af15db23abe0107
Author: Carlos IL <carlosil@chromium.org>
Date: Thu Jun 07 22:09:36 2018

UMA uploads to localhost are no longer encrypted.

To allow testing with a local collector (that has decryption disabled),
we no longer encrypt HTTP UMA uploads if the destination is localhost.

Bug:  849127 
Change-Id: Ied550633e7c11724bb6f61932963914b09560978
Reviewed-on: https://chromium-review.googlesource.com/1091274
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Carlos IL <carlosil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565436}
[modify] https://crrev.com/0181723ea9ed937a6cacb2c44af15db23abe0107/components/metrics/net/net_metrics_log_uploader.cc
[modify] https://crrev.com/0181723ea9ed937a6cacb2c44af15db23abe0107/components/metrics/net/net_metrics_log_uploader_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment