Commit 5ae898e3 authored by Ryan Hansberry's avatar Ryan Hansberry Committed by Chromium LUCI CQ

[Nearby] Correct InstantMessaging metrics prefixes.

These metrics are currently prefixed with "Nearby.Share". Nearby Share
is an application that depends on the Nearby Connections library. In
reality, these metrics actually instrument an implementation of the
Nearby Connections library, not an application like Nearby Share,
and should instead be prefixed with "Nearby.Connections".

This mistake was made because this logic resides in a 'nearby_sharing'
directory, which is an unfortunate historical artifact. All of this
logic needs to eventually be migrated to a more generic location,
but more urgently, these metrics need to be migrated to their correct
prefix.

The previous metrics, prefixed with "Nearby.Share", have only been
deployed to dev-channel, for a week, and will never be used, so I have
not applied aa 'obsolete' label to them, opting instead to outright
remove them.

Bug: 1123172
Change-Id: Ia22407469f4bc9a7f84813c17e37a5ce5d888624
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2580907Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Reviewed-by: default avatarJosh Nohle <nohle@chromium.org>
Commit-Queue: Ryan Hansberry <hansberry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835337}
parent 01452edf
......@@ -59,14 +59,15 @@ void LogReceiveResult(bool success, const network::SimpleURLLoader* loader) {
ss << "Instant messaging receive express "
<< (success ? "succeeded." : "failed.");
base::UmaHistogramBoolean(
"Nearby.Share.InstantMessaging.ReceiveExpress.Result", success);
"Nearby.Connections.InstantMessaging.ReceiveExpress.Result", success);
if (loader) {
NearbyShareHttpStatus http_status(loader->NetError(),
loader->ResponseInfo());
ss << " HTTP status: " << http_status;
if (!success) {
base::UmaHistogramSparse(
"Nearby.Share.InstantMessaging.ReceiveExpress.Result.FailureReason",
"Nearby.Connections.InstantMessaging.ReceiveExpress.Result."
"FailureReason",
http_status.GetResultCodeForMetrics());
}
} else {
......
......@@ -65,11 +65,11 @@ void LogSendResult(bool success, const NearbyShareHttpStatus& http_status) {
} else {
NS_LOG(WARNING) << ss.str();
}
base::UmaHistogramBoolean("Nearby.Share.InstantMessaging.SendExpress.Result",
success);
base::UmaHistogramBoolean(
"Nearby.Connections.InstantMessaging.SendExpress.Result", success);
if (!success) {
base::UmaHistogramSparse(
"Nearby.Share.InstantMessaging.SendExpress.Result.FailureReason",
"Nearby.Connections.InstantMessaging.SendExpress.Result.FailureReason",
http_status.GetResultCodeForMetrics());
}
}
......
......@@ -9527,6 +9527,36 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</summary>
</histogram>
<histogram name="Nearby.Connections.InstantMessaging.{Direction}Express.Result"
enum="BooleanSuccess" expires_after="2021-08-19">
<owner>nohle@chromium.org</owner>
<owner>better-together-dev@google.com</owner>
<summary>
Records whether an HTTPS call to {Direction} the Instant Messaging API
succeeds or fails. Emitted when the HTTPS call succeeds or fails.
</summary>
<token key="Direction">
<variant name="Receive" summary="receive a message from"/>
<variant name="Send" summary="send a message to"/>
</token>
</histogram>
<histogram
name="Nearby.Connections.InstantMessaging.{Direction}Express.Result.FailureReason"
enum="CombinedHttpResponseAndNetErrorCode" expires_after="2021-08-19">
<owner>nohle@chromium.org</owner>
<owner>better-together-dev@google.com</owner>
<summary>
Records the network error code or HTTPS response code from a failed HTTPS
call to {Direction} the Instant Messaging API. Emitted when the HTTPS call
fails.
</summary>
<token key="Direction">
<variant name="Receive" summary="receive a message from"/>
<variant name="Send" summary="send a message to"/>
</token>
</histogram>
<histogram
name="Nearby.Share.Certificates.Manager.BluetoothMacAddressSetInPrivateCertificate"
enum="BooleanSet" expires_after="2021-08-19">
......@@ -9766,36 +9796,6 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</summary>
</histogram>
<histogram name="Nearby.Share.InstantMessaging.{Direction}Express.Result"
enum="BooleanSuccess" expires_after="2021-08-19">
<owner>nohle@chromium.org</owner>
<owner>better-together-dev@google.com</owner>
<summary>
Records whether an HTTPS call to {Direction} the Instant Messaging API
succeeds or fails. Emitted when the HTTPS call succeeds or fails.
</summary>
<token key="Direction">
<variant name="Receive" summary="receive a message from"/>
<variant name="Send" summary="send a message to"/>
</token>
</histogram>
<histogram
name="Nearby.Share.InstantMessaging.{Direction}Express.Result.FailureReason"
enum="CombinedHttpResponseAndNetErrorCode" expires_after="2021-08-19">
<owner>nohle@chromium.org</owner>
<owner>better-together-dev@google.com</owner>
<summary>
Records the network error code or HTTPS response code from a failed HTTPS
call to {Direction} the Instant Messaging API. Emitted when the HTTPS call
fails.
</summary>
<token key="Direction">
<variant name="Receive" summary="receive a message from"/>
<variant name="Send" summary="send a message to"/>
</token>
</histogram>
<histogram name="Nearby.Share.LocalDeviceData.DeviceDataUpdater.HttpResult"
enum="NearbyShareHttpResult" expires_after="2021-08-19">
<owner>cclem@chromium.org</owner>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment