Add analytics for cert exchange step
Summary: This diff adds analytics for events like uploading certs, zipping certs.Also logs the payload data received in trusted and untrusted request handlers. It will be helpful to debug the issues through this events. Reviewed By: jknoxville Differential Revision: D23374024 fbshipit-source-id: 6fa709bbf05e1b99ed1882be953abbd968eefc6e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
610d06cbec
commit
cf29bee5fa
@@ -282,6 +282,13 @@ class Server extends EventEmitter {
|
||||
}
|
||||
const clientData: ClientQuery &
|
||||
ClientCsrQuery & {medium: number | undefined} = JSON.parse(payload.data);
|
||||
this.logger.track('usage', 'trusted-request-handler-called', {
|
||||
app: clientData.app,
|
||||
os: clientData.os,
|
||||
device: clientData.device,
|
||||
device_id: clientData.device_id,
|
||||
medium: clientData.medium,
|
||||
});
|
||||
this.connectionTracker.logConnectionAttempt(clientData);
|
||||
|
||||
const {
|
||||
@@ -356,6 +363,8 @@ class Server extends EventEmitter {
|
||||
return {};
|
||||
}
|
||||
const clientData: ClientQuery = JSON.parse(payload.data);
|
||||
this.logger.track('usage', 'untrusted-request-handler-called', clientData);
|
||||
|
||||
this.connectionTracker.logConnectionAttempt(clientData);
|
||||
|
||||
const client: UninitializedClient = {
|
||||
|
||||
@@ -181,8 +181,15 @@ export default class CertificateProvider {
|
||||
archive.pipe(output);
|
||||
archive.finalize();
|
||||
});
|
||||
await zipPromise;
|
||||
await this.uploadFiles(certsZipPath, deviceId);
|
||||
|
||||
await reportPlatformFailures(
|
||||
zipPromise,
|
||||
'www-certs-exchange-zipping-certs',
|
||||
);
|
||||
await reportPlatformFailures(
|
||||
this.uploadFiles(certsZipPath, deviceId),
|
||||
'www-certs-exchange-uploading-certs',
|
||||
);
|
||||
}
|
||||
return {
|
||||
deviceId,
|
||||
|
||||
Reference in New Issue
Block a user