Skip to main content

@fluidframework/devtools-core Package

Contains an API for initializing developer tooling alongside the Fluid Framework.

This tooling is built for use alongside our Chromium browser extension. It listens for incoming messages from the corresponding extension, and posts direct responses as well as automatic updates for Fluid state changes.

Individual Fluid Containers can be registered to generate Container-level stats.

Visualization of telemetry logs can be enabled by creating a DevtoolsLogger and providing it to Devtools initialization.

See the package README for more details.

Interfaces

InterfaceAlertsModifiersDescription
ContainerDevtoolsPropsBetasealedProperties for registering a IContainer with the Devtools.
ContainerRuntimePropsBetasealedProperties for registering a container runtime with the Devtools.
FluidDevtoolsPropsBetasealedProperties for configuring the Devtools.
HasContainerKeySystemsealedCommon interface for data associated with a particular Container registered with the Devtools.
IDevtoolsLoggerBetasealedLogger implementation that posts all telemetry events to the window (globalThis object). This logger is intended to integrate with the Fluid DevTools browser extension.
IFluidDevtoolsBetasealedFluid Devtools. A single, global instance is used to generate and communicate stats associated with the general Fluid runtime (i.e., it is not associated with any single Framework entity).

Types

TypeAliasAlertsDescription
ContainerKeyBetaA key used to identify and differentiate Containers registered with the IFluidDevtools.

Functions

FunctionAlertsReturn TypeDescription
createDevtoolsLogger(baseLogger)BetaIDevtoolsLoggerCreates a new IDevtoolsLogger by wrapping the provided (optional) base logger.
initializeDevtools(props)BetaIFluidDevtoolsInitializes the Devtools singleton and returns a handle to it.
tryGetFluidDevtools()BetaIFluidDevtools | undefinedGets the Devtools singleton if it has been initialized, otherwise returns undefined.

Function Details

createDevtoolsLogger

Creates a new IDevtoolsLogger by wrapping the provided (optional) base logger.

This API is provided as a beta preview and may change without notice.

To use, import via @fluidframework/devtools-core/beta.

For more information about our API support guarantees, see here.

Signature

export declare function createDevtoolsLogger(baseLogger?: ITelemetryBaseLogger): IDevtoolsLogger;

Parameters

ParameterModifiersTypeDescription
baseLoggeroptionalITelemetryBaseLogger

Returns

Return type: IDevtoolsLogger

initializeDevtools

Initializes the Devtools singleton and returns a handle to it.

This API is provided as a beta preview and may change without notice.

To use, import via @fluidframework/devtools-core/beta.

For more information about our API support guarantees, see here.

Signature

export declare function initializeDevtools(props?: FluidDevtoolsProps): IFluidDevtools;

Remarks

The instance is tracked as a static singleton.

It is automatically disposed on webpage unload, but it can be closed earlier by calling dispose on the returned handle.

Parameters

ParameterModifiersTypeDescription
propsoptionalFluidDevtoolsProps

Returns

Return type: IFluidDevtools

tryGetFluidDevtools

Gets the Devtools singleton if it has been initialized, otherwise returns undefined.

This API is provided as a beta preview and may change without notice.

To use, import via @fluidframework/devtools-core/beta.

For more information about our API support guarantees, see here.

Signature

export declare function tryGetFluidDevtools(): IFluidDevtools | undefined;

Returns

Return type: IFluidDevtools | undefined