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

# Inspectors

<View title="Developer" />

<View title="Federal docs" />

<View title="EU docs" />

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 this functionality.
* [React Web](#javascript): The React Web SDK relies on the JavaScript SDK for this functionality.
* [Vue](#javascript): The Vue SDK relies on the JavaScript SDK for this functionality.

### JavaScript

<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" expandable lines wrap theme={null}
    const client = LDClient.initialize(
      'example-client-side-id',
      context,
      {
        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](/docs/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.

### Vue

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