Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Latest commit

 

History

History
33 lines (27 loc) · 1.47 KB

architecture.md

File metadata and controls

33 lines (27 loc) · 1.47 KB

Augury Labs - Architecture

Augury Labs has a new architecture different from the architecture of the Augury DevTools, with a modular, UI-agnostic design based on an event-driven core. We will be publishing more in-depth documentation about this new architecture.

How it Works

@augury/core maintains a set of Probes, which attach themselves to various objects present in the application's context, for example: NgZone, NgModule, the global Promise constructor, etc. Certain triggers from these Probes will emit events within @augury/core, which will synchronously react to the event before returning control back to the application. Events can be consumed by Plugins to provide different types of metrics and interfaces. Probes can also affect the object they are attached to, allowing for Plugins to offer interactive behavior.

To run your app under Augury Labs, you should call the auguryBootstrap function exported by @augury/core, passing your app module, your platform factory, the NgZone service, and an array of Augury Labs plugin instances that you want to use:

auguryBootstrap({
  platform: platformBrowserDynamic,
  ngModule: AppModule,
  NgZone,
  plugins: [new PerformanceProfilerPlugin()],
});

Notice how the call to auguryBootstrap completely replaces the installation of platformBrowserDynamic and subsequent bootstrapModule method call.