> ## 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.

# Advanced Setup

> The Decipher AI setup process allows for some additional customizability beyond the defaults.

> [!TIP]
>
> **⏱ Estimated Time To Completion: 10 minutes**

## Understand the basics

Before diving into advanced configurations, ensure you have completed the basic setup as outlined in the [Quickstart guide](./quickstart). The advanced configurations build upon the initial setup.

Custom configuration is achieved by adjusting the Sentry `init` call in your project; options vary by language/framework.
For a full list of options and more information, refer to the [official Sentry documentation](https://docs.sentry.io/).

Below we provide some common examples and recommended configuration options.

## Example: Customizing Sentry Initialization for NextJS

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

Sentry.init({
  dsn: process.env.DECIPHER_DSN, // Replace with your Decipher DSN.
  integrations: [
    // Capture session replay data.
    Sentry.replayIntegration({
      maskAllText: false,
      maskAllInputs: false,
      blockAllMedia: false,
      networkDetailAllowUrls: [/^.*$/],
    }),
    // Capture request bodies for failed HTTP requests.
    Sentry.httpClientIntegration()
  ],
  tracesSampleRate: 1.0, // Adjust based on your needs.
  replaysSessionSampleRate: 0.5, // Adjust session replay sample rate.
  replaysOnErrorSampleRate: 1.0, // Ensure all error sessions are captured.
  beforeSend(event) {
    // Modify or drop events before sending them to Decipher
    if (event.exception) {
      // For example, filter out non-production errors.
      // (You can also do this via the `enabled` param.)
      if (process.env.NODE_ENV !== 'production') {
        return null;
      }
    }
    return event;
  },
});

```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.