mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-10-28 23:15:54 +02:00
Bug 1960567 - Migrate histograms to use Glean APIs in dom/security/, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D255548
This commit is contained in:
parent
00313a80b6
commit
e921a2f40b
2 changed files with 48 additions and 3 deletions
|
|
@ -438,6 +438,51 @@ security:
|
||||||
expires: never
|
expires: never
|
||||||
telemetry_mirror: HTTPS_ONLY_MODE_UPGRADE_TIME_MS
|
telemetry_mirror: HTTPS_ONLY_MODE_UPGRADE_TIME_MS
|
||||||
|
|
||||||
|
https_only_mode_upgrade_type:
|
||||||
|
type: dual_labeled_counter
|
||||||
|
description: >
|
||||||
|
What content type did we upgrade, and did it load successfully?
|
||||||
|
|
||||||
|
This metric was generated to correspond to the Legacy Telemetry boolean
|
||||||
|
histogram HTTPS_ONLY_MODE_UPGRADE_TYPE.
|
||||||
|
dual_labels:
|
||||||
|
key:
|
||||||
|
labels:
|
||||||
|
- "unknown"
|
||||||
|
- "audio"
|
||||||
|
- "video"
|
||||||
|
- "script"
|
||||||
|
- "object"
|
||||||
|
- "document"
|
||||||
|
- "subdocument"
|
||||||
|
- "xmlhttprequest"
|
||||||
|
- "image"
|
||||||
|
- "dtd"
|
||||||
|
- "font"
|
||||||
|
- "fetch"
|
||||||
|
- "websocket"
|
||||||
|
- "stylesheet"
|
||||||
|
- "cspreport"
|
||||||
|
- "webmanifest"
|
||||||
|
- "ping"
|
||||||
|
- "xslt"
|
||||||
|
- "proxied-webrtc"
|
||||||
|
description: External content policy type.
|
||||||
|
category:
|
||||||
|
labels:
|
||||||
|
- "false"
|
||||||
|
- "true"
|
||||||
|
description: Boolean
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1675533
|
||||||
|
data_reviews:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1675533
|
||||||
|
notification_emails:
|
||||||
|
- seceng-telemetry@mozilla.com
|
||||||
|
- julianwels@mozilla.com
|
||||||
|
expires: never
|
||||||
|
telemetry_mirror: HTTPS_ONLY_MODE_UPGRADE_TYPE
|
||||||
|
|
||||||
referrer_policy_count:
|
referrer_policy_count:
|
||||||
type: custom_distribution
|
type: custom_distribution
|
||||||
description: >
|
description: >
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
#include "NSSErrorsService.h"
|
#include "NSSErrorsService.h"
|
||||||
#include "mozilla/glean/DomSecurityMetrics.h"
|
#include "mozilla/glean/DomSecurityMetrics.h"
|
||||||
#include "mozilla/Telemetry.h"
|
|
||||||
#include "mozilla/TimeStamp.h"
|
#include "mozilla/TimeStamp.h"
|
||||||
#include "mozilla/dom/WindowGlobalParent.h"
|
#include "mozilla/dom/WindowGlobalParent.h"
|
||||||
#include "mozpkix/pkixnss.h"
|
#include "mozpkix/pkixnss.h"
|
||||||
|
|
@ -244,8 +243,9 @@ void nsHTTPSOnlyStreamListener::RecordUpgradeTelemetry(nsIRequest* request,
|
||||||
|
|
||||||
// Needs bug 1657470 (New Metric Type: "Keyed Categorical") before
|
// Needs bug 1657470 (New Metric Type: "Keyed Categorical") before
|
||||||
// this can be migrated to Glean.
|
// this can be migrated to Glean.
|
||||||
mozilla::Telemetry::Accumulate(
|
mozilla::glean::security::https_only_mode_upgrade_type
|
||||||
mozilla::Telemetry::HTTPS_ONLY_MODE_UPGRADE_TYPE, typeKey, success);
|
.Get(typeKey, success ? "true"_ns : "false"_ns)
|
||||||
|
.Add();
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsHTTPSOnlyStreamListener::LogUpgradeFailure(nsIRequest* request,
|
void nsHTTPSOnlyStreamListener::LogUpgradeFailure(nsIRequest* request,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue