import { initTelemetry } from '@launchdarkly/browser-telemetry';
initTelemetry();
After initialization the telemetry client must be registered with the LaunchDarkly SDK client.
import { initTelemetry, register } from '@launchdarkly/browser-telemetry';
initTelemetry();
// Create your LaunchDarkly client following the LaunchDarkly SDK documentation.
register(ldClient);
If using the 3.x version of the LaunchDarkly SDK, then you must also add inspectors when initializing your LaunchDarkly client. This allows for integration with feature flag data.
import { initTelemetry, register, inspectors } from '@launchdarkly/browser-telemetry';
import { init } from 'launchdarkly-js-client-sdk';
initTelemetry();
const ldClient = init('YOUR_CLIENT_SIDE_ID', {
inspectors: inspectors()
});
register(ldClient);
Generated using TypeDoc
Initialize the LaunchDarkly telemetry client
This method should be called one time as early as possible in the application lifecycle.