Wire up usage tracking to Flipper core

Summary: Connect usage tracking to the Flipper core, individual elements will be wrapped in a next diff

Reviewed By: passy

Differential Revision: D25196284

fbshipit-source-id: 103e1d21d2f23fbbc21975fa85082811f6f53348
This commit is contained in:
Michel Weststrate
2020-12-03 04:13:07 -08:00
committed by Facebook GitHub Bot
parent b885ff3b9e
commit 3394f85fc7
3 changed files with 39 additions and 9 deletions

View File

@@ -46,7 +46,7 @@ import {Message} from './reducers/pluginMessageQueue';
import {Idler} from './utils/Idler';
import {processMessageQueue} from './utils/messageQueue';
import {ToggleButton, SmallText, Layout} from './ui';
import {_SandyPluginRenderer} from 'flipper-plugin';
import {TrackingScope, _SandyPluginRenderer} from 'flipper-plugin';
import {isDevicePluginDefinition} from './utils/pluginUtils';
import ArchivedDevice from './devices/ArchivedDevice';
import {ContentContainer} from './sandy-chrome/ContentContainer';
@@ -431,7 +431,11 @@ class PluginContainer extends PureComponent<Props, State> {
isArchivedDevice,
settingsState,
};
pluginElement = React.createElement(activePlugin, props);
pluginElement = (
<TrackingScope scope={'plugin:' + activePlugin.id}>
{React.createElement(activePlugin, props)}
</TrackingScope>
);
}
return isSandy ? (
<Layout.Right>