Bug 1652104 - Add telemtery about HTTP3 usage. r=michal,necko-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D83168
This commit is contained in:
Dragana Damjanovic 2020-07-16 04:03:35 +00:00
Родитель a6fc16aabe
Коммит 20cbb9badf
5 изменённых файлов: 37 добавлений и 0 удалений

Просмотреть файл

@ -181,6 +181,9 @@ void Http3Session::Shutdown() {
Http3Session::~Http3Session() {
LOG3(("Http3Session::~Http3Session %p", this));
Telemetry::Accumulate(Telemetry::HTTP3_REQUEST_PER_CONN,
mTransactionCount);
Shutdown();
}
@ -655,6 +658,7 @@ nsresult Http3Session::TryActivating(
MOZ_ASSERT(*aStreamId != UINT64_MAX);
mStreamIdHash.Put(*aStreamId, RefPtr{aStream});
mTransactionCount++;
return NS_OK;
}

Просмотреть файл

@ -178,6 +178,8 @@ class Http3Session final : public nsAHttpTransaction,
RefPtr<QuicSocketControl> mSocketControl;
nsCString mAlpnToken;
uint64_t mTransactionCount = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(Http3Session, NS_HTTP3SESSION_IID);

Просмотреть файл

@ -483,6 +483,8 @@ nsresult nsHttpHandler::Init() {
Preferences::RegisterPrefixCallbacks(nsHttpHandler::PrefsChanged,
gCallbackPrefs, this);
PrefsChanged(nullptr);
Telemetry::ScalarSet(
Telemetry::ScalarID::NETWORKING_HTTP3_ENABLED, mHttp3Enabled);
mMisc.AssignLiteral("rv:" MOZILLA_UAVERSION);

Просмотреть файл

@ -3319,6 +3319,17 @@
"keyed": true,
"description": "Error code when http3 connection is closed. Look at Http3Session for more details."
},
"HTTP3_REQUEST_PER_CONN": {
"record_in_processes": ["main", "content"],
"products": ["firefox"],
"alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
"high": 1000,
"n_buckets": 50,
"bug_numbers": [1652104],
"description": "HTTP3: Streams created per connection"
},
"HTTP_CONTENT_ENCODING": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec"],

Просмотреть файл

@ -4675,6 +4675,24 @@ networking:
- 'main'
release_channel_collection: opt-out
http3_enabled:
bug_numbers:
- 1652104
description: >
True if HTTP3 is enabled at the start of a session.
expires: never
kind: boolean
keyed: false
notification_emails:
- necko@mozilla.com
- ddamjanovic@mozilla.com
release_channel_collection: opt-out
products:
- 'firefox'
record_in_processes:
- 'main'
- 'content'
blocklist:
lastModified_rs_addons:
bug_numbers: