> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Inspectors

> This topic explains how to configure inspectors for client-side JavaScript LaunchDarkly SDKs.

> For the complete documentation index, see [llms.txt](/llms.txt). For the full documentation snapshot, see [llms-full.txt](/llms-full.txt).

## Overview

This topic explains how to configure inspectors for client-side JavaScript LaunchDarkly SDKs.

## Inspector types

There are different types of inspectors you can provide when configuring the JavaScript SDK. They are intended for monitoring, analytics, or debugging purposes. The application should not use these interfaces to access flags for the purpose of controlling application flow.

These are the inspector types:

* [Flag Used](https://launchdarkly.github.io/js-sdk-common/interfaces/LDInspectionFlagUsedHandler.html)
* [Flag Details Changed](https://launchdarkly.github.io/js-sdk-common/interfaces/LDInspectionFlagDetailsChangedHandler.html)
* [Flag Detail Changed](https://launchdarkly.github.io/js-sdk-common/interfaces/LDInspectionFlagDetailChangedHandler.html)

Details about each SDK's configuration are available in the SDK-specific sections below:

* [JavaScript](#javascript)
* [React Native](#javascript): The React Native SDK relies on the JavaScript SDK for user-related functionality.
* [React Web](#javascript): The React Web SDK relies on the JavaScript SDK for user-related functionality.

### Java

Script

<Accordion title="Expand JavaScript code sample">
  The inspector `type` defines when in the SDK lifecycle it calls the `method` callback, and with what arguments.

  To configure a `Flag Used` inspector, set type to `flag-used` and pass in a method that matches the expected signature:

  <CodeGroup>
    ```js title="JavaScript" theme={null}
          const client = LDClient.initialize(
            'example-client-side-id',
            context,
            options: {
              inspectors: [
                {
                  type: 'flag-used',
                  name: 'example-flag-used',
                  method: (flagKey, flagDetail) => {
                    console.log(flagKey)
                    console.log(flagDetail)
                  }
                }
              ]
            }
          );

          try {
            await client.waitForInitialization(5);
            proceedWithSuccessfullyInitializedClient();
          } catch(err) {
            // Client failed to initialized or timed out
            // variation() calls return fallback values until initialization completes
          }

    ```
  </CodeGroup>
</Accordion>

### React Native

Inspector-related functionality provided by the [JavaScript SDK](#javascript) is available but deprecated in version 10 of the React Native SDK. We recommend that you use [hooks](/sdk/features/hooks#react-native) instead.

### React Web

All inspector-related functionality provided by the [JavaScript SDK](#javascript) is also available in the React Web SDK.
