Add framework event infra
Summary: Added infra for collecting events from UI frameworks. 1. Framework event metadata captures all the static metadata around the event. This allows to us to not send the same metadata in every event as well as populate the monitoring drop down immediately. This is sent in init since this information is static 2. Framework event itself is quite bare at the moment. It will have thread and more attributes in the future The UIdebugger litho support ulitity has been simplified now there are 3 extension points. Context renamed to UIDContext since it is referenced in app initialisers where the android context is also imported and it create a naming collision Reviewed By: lblasa Differential Revision: D42606933 fbshipit-source-id: a419f3fd424c533d586813004c40b68feafd9a2e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
39b14fc428
commit
914b32c383
@@ -22,6 +22,7 @@ import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin.SharedPreferencesDescriptor;
|
||||
import com.facebook.flipper.plugins.uidebugger.UIDebuggerFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.uidebugger.core.UIDContext;
|
||||
import com.facebook.flipper.plugins.uidebugger.descriptors.DescriptorRegister;
|
||||
import com.facebook.flipper.plugins.uidebugger.litho.UIDebuggerLithoSupport;
|
||||
import com.facebook.flipper.plugins.uidebugger.observers.TreeObserverFactory;
|
||||
@@ -62,12 +63,10 @@ public final class FlipperInitializer {
|
||||
|
||||
DescriptorRegister descriptorRegister = DescriptorRegister.Companion.withDefaults();
|
||||
TreeObserverFactory treeObserverFactory = TreeObserverFactory.Companion.withDefaults();
|
||||
UIDebuggerLithoSupport.INSTANCE.addDescriptors(descriptorRegister);
|
||||
UIDebuggerLithoSupport.INSTANCE.addObserver(treeObserverFactory);
|
||||
UIDContext uidContext = UIDContext.Companion.create((Application) context);
|
||||
UIDebuggerLithoSupport.INSTANCE.enable(uidContext);
|
||||
|
||||
client.addPlugin(
|
||||
new UIDebuggerFlipperPlugin(
|
||||
(Application) context, descriptorRegister, treeObserverFactory));
|
||||
client.addPlugin(new UIDebuggerFlipperPlugin(uidContext));
|
||||
client.start();
|
||||
|
||||
final OkHttpClient okHttpClient =
|
||||
|
||||
Reference in New Issue
Block a user