This is the API reference for the LaunchDarkly Observability Plugin for React Native.
In typical usage you will only need to instantiate the Observability plugin and pass it to the LaunchDarkly client during initialization.
The settings for the observability plugins are defined by the ReactNativeOptions interface.
The LDObserve singleton is used for manual tracking of events, metrics, and logs. The singleton implements the Observe interface.
import { AutoEnvAttributes, LDProvider, ReactNativeLDClient,} from '@launchdarkly/react-native-client-sdk';import { Observability, LDObserve } from '@launchdarkly/observability-react-native'const client = new ReactNativeLDClient( mobileKey, AutoEnvAttributes.Enabled, { plugins: [ new Observability({ // Error handling is enabled by default for all error types // Optional configuration: errorHandling: { errorSampleRate: 1.0, // Default: 1.0 (capture all errors) beforeSend: (error, context) => { // Optional: filter errors before sending return error } } }), ] }) Copy
import { AutoEnvAttributes, LDProvider, ReactNativeLDClient,} from '@launchdarkly/react-native-client-sdk';import { Observability, LDObserve } from '@launchdarkly/observability-react-native'const client = new ReactNativeLDClient( mobileKey, AutoEnvAttributes.Enabled, { plugins: [ new Observability({ // Error handling is enabled by default for all error types // Optional configuration: errorHandling: { errorSampleRate: 1.0, // Default: 1.0 (capture all errors) beforeSend: (error, context) => { // Optional: filter errors before sending return error } } }), ] })
This is the API reference for the LaunchDarkly Observability Plugin for React Native.
In typical usage you will only need to instantiate the Observability plugin and pass it to the LaunchDarkly client during initialization.
The settings for the observability plugins are defined by the ReactNativeOptions interface.
The LDObserve singleton is used for manual tracking of events, metrics, and logs. The singleton implements the Observe interface.
Quick Start