Interface LDInspectionFlagUsedHandler

Callback interface for collecting information about the SDK at runtime.

This interface is used to collect information about flag usage.

This interface should not be used by the application to access flags for the purpose of controlling application flow. It is intended for monitoring, analytics, or debugging purposes.

interface LDInspectionFlagUsedHandler {
    method: ((flagKey, flagDetail, context) => void);
    name: string;
    synchronous?: boolean;
    type: "flag-used";
}

Properties

method: ((flagKey, flagDetail, context) => void)

This method is called when a flag is accessed via a variation method, or it can be called based on actions in wrapper SDKs which have different methods of tracking when a flag was accessed. It is not called when a call is made to allFlags.

Type declaration

name: string

Name of the inspector. Will be used for logging issues with the inspector.

synchronous?: boolean

If true, then the inspector will be ran synchronously with evaluation. Synchronous inspectors execute inline with evaluation and care should be taken to ensure they have minimal performance overhead.

type: "flag-used"