Add sdkVersion to ping events
Summary: So we can see usage of old sdks. Reviewed By: passy Differential Revision: D14022623 fbshipit-source-id: 22f0681cbf4374e2cf3256e1049d154789e1959e
This commit is contained in:
committed by
Facebook Github Bot
parent
92271d1454
commit
ce5f739d81
@@ -49,25 +49,32 @@ export default (store: Store, logger: Logger) => {
|
||||
if (!selectedDevice || !selectedPlugin) {
|
||||
return;
|
||||
}
|
||||
|
||||
let app: string;
|
||||
let sdkVersion: number;
|
||||
|
||||
if (selectedApp) {
|
||||
const client = clients.find((c: Client) => c.id === selectedApp);
|
||||
if (client) {
|
||||
app = client.query.app;
|
||||
sdkVersion = client.query.sdk_version || 0;
|
||||
}
|
||||
}
|
||||
|
||||
const info = {
|
||||
droppedFrames,
|
||||
largeFrameDrops,
|
||||
os: selectedDevice.os,
|
||||
device: selectedDevice.title,
|
||||
plugin: selectedPlugin,
|
||||
app,
|
||||
sdkVersion,
|
||||
};
|
||||
|
||||
// reset dropped frames counter
|
||||
droppedFrames = 0;
|
||||
largeFrameDrops = 0;
|
||||
|
||||
if (selectedApp) {
|
||||
const client = clients.find((c: Client) => c.id === selectedApp);
|
||||
if (client) {
|
||||
// $FlowFixMe
|
||||
info.app = client.query.app;
|
||||
}
|
||||
}
|
||||
|
||||
logger.track('usage', 'ping', info);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user