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

# 100+ Other Frameworks

> Decipher collects data via the Sentry SDK for backends.

<Check>**⏱ Estimated Time To Completion: 5 minutes**</Check>

<Note>
  Please make sure you've [installed Decipher for your frontend](/pages/browser-quickstart) before continuing.
</Note>

<Steps>
  <Step title="Initialize the Sentry SDK">
    Initialize the Sentry SDK in your backend project. The steps for this vary based on your language and framework; see [Sentry docs here](https://docs.sentry.io/).

    For example, for a NextJS project, run the following command at the root of your repository.

    ```bash Terminal theme={null}
    npx @sentry/wizard@latest -i nextjs
    ```
  </Step>

  <Step title="Create a Decipher project and get your DSN">
    <AccordionGroup>
      <Accordion title="If you're using Decipher only (recommended)" defaultOpen={true} icon="circle-check" iconType="regular">
        Login to [Decipher](https://app.getdecipher.com) with your work email. On the [Settings > Projects](https://app.getdecipher.com/settings?section=projects),
        select a new project name and click "**Create New Project**". Decipher will generate a DSN to use in the next step; copy this to your clipboard.
      </Accordion>

      <Accordion title="If you already have a Sentry project" icon="arrow-right-arrow-left" iconType="regular">
        *\[These steps **only apply** if you already have a project in Sentry you would like to continue sending data to, in addition to sending data to Decipher.
        Otherwise, see [\*\*"\*\*If you're using Decipher only"](#if-you-re-using-decipher-only-recommended) sub-section above.]*

        Login to [Decipher](https://app.getdecipher.com) with your work email. On the [Settings > Projects](https://app.getdecipher.com/settings?section=projects),
        select a new project name and click "**Create New Project**". On the following screen, choose "Decipher and Sentry" to create a project that sends
        data to both Decipher and Sentry.

        Enter your Sentry DSN and if possible, your auth token. Decipher will create a project and give you a new DSN to use
        (see [Already using Sentry?](/coming-from-sentry) if you need more help).

        <Tip>You can configure Decipher to stop sending data to Sentry to avoid double charges — just follow the above steps instead.</Tip>
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="Update your Sentry initialization">
    Update the DSN parameter in your Sentry `init` call (which varies by language) to the new DSN.

    For example:

    ```typescript instrumentation.ts theme={null}
    import * as Sentry from "@sentry/nextjs";

    Sentry.init({
      dsn: process.env.DECIPHER_DSN_FROM_STEP_2, // Replace with your Decipher DSN.
      // Other Sentry options can go here.
    });
    ```

    <Note>For NextJS projects, you'll need to update the DSN in `sentry.client.config.ts`, `sentry.edge.config.ts`, and `sentry.server.config.ts` (or `instrumentation.ts`).</Note>
  </Step>

  <Step title="[Frontend Only] Configuring Session Replays for AI Analysis">
    To provide enough context for the AI to determine which errors are high severity, you need to make sure session replays are configured correctly.

    It is important that you set `maskAllText: false`. For additional privacy, you can set `maskAllInputs: true`.

    Recommended configuration:

    ```typescript sentry.client.config.ts theme={null}
    Sentry.init({
      dsn: process.env.DECIPHER_DSN_FROM_STEP_2, // Replace with your Decipher DSN.
      integrations: [
        Sentry.replayIntegration({
          maskAllText: false,
          maskAllInputs: false, // Set this to `true` for extra privacy.
          blockAllMedia: false,
        }),
      ],
      // Other Sentry options can go here.
    });
    ```
  </Step>

  <Step title="Test the integration">
    That's it! Now test the integration by forcing an error anywhere in your app, e.g.

    ```typescript app/cart.tsx theme={null}
    function Cart() {
        // ... existing code ...

        const handleError = () => {
            throw new Error("This is a test error for Decipher's Sentry integration.");
        };

        return (
            <div>
                <button onClick={handleError}>Trigger Error</button>
            </div>
        );
        // ... existing code ...
    }
    ```

    Check out the [Decipher dashboard](https://app.getdecipher.com) to see information about your captured error.
    Decipher will automatically analyze and group your errors to highlight the important, high-impact ones.
  </Step>
</Steps>
