---
title: "Types"
description: "TypeScript type definitions and interfaces exported by @eienjs/adonisjs-sentry."
canonical_url: "https://eienjs.com/packages/adonisjs-sentry/api-reference/types"
---

> Index of every page on this site: [llms.txt](https://eienjs.com/llms.txt)

Import type definitions directly from `@eienjs/adonisjs-sentry/types`:

```ts
import type {
  ExceptionConstructor,
  SentryConfig,
  SentryReportOptions,
} from '@eienjs/adonisjs-sentry/types';
```

## `SentryConfig`

The main configuration interface passed to `defineConfig`. It extends Sentry's native `NodeOptions` from `@sentry/node` (excluding `dsn` and `environment` which have specialized definitions here).

```ts
export interface SentryConfig extends Omit<NodeOptions, 'dsn' | 'environment'> {
  /**
   * Enable or disable Sentry
   */
  enabled: boolean;

  /**
   * The environment Sentry is running in
   */
  environment: string;

  /**
   * The DSN of the project. Optional so the app can run without it
   * when Sentry is disabled.
   */
  dsn?: string;

  /**
   * Options controlling how exceptions are reported
   */
  report?: SentryReportOptions;
}
```

## `SentryReportOptions`

Options controlling error filtering, context extraction, and issue fingerprinting in `reportException`.

```ts
export interface SentryReportOptions {
  /**
   * HTTP statuses that should never be reported.
   */
  ignoreStatuses?: number[];

  /**
   * Error codes (e.g. "E_VALIDATION_ERROR") that should never be reported.
   */
  ignoreCodes?: string[];

  /**
   * Exception classes that should never be reported.
   */
  ignoreExceptions?: ExceptionConstructor[];

  /**
   * Attach the authenticated user (ctx.auth.user) to the event.
   * Defaults to true. Email and IP are only sent when dataCollection.userInfo is not false.
   */
  captureUser?: boolean;

  /**
   * Group events by the Adonis error code (E_*) instead of the message.
   * Defaults to true.
   */
  fingerprintByCode?: boolean;
}
```

## `ExceptionConstructor`

A constructor type matching abstract or concrete exception classes for `instanceof` checks in `ignoreExceptions`:

```ts
export type ExceptionConstructor = abstract new (...args: any[]) => unknown;
```

## Sitemap

See the full [sitemap](https://eienjs.com/sitemap.md) for all pages.
