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

# Configuration

> Configure the Apitally Serverless SDK for JavaScript.

```javascript Hono {7-10} theme={null}
import { Hono } from "hono";
import { useApitally } from "@apitally/serverless/hono";

const app = new Hono();

useApitally(app, {
  logRequestHeaders: true,
  logRequestBody: true,
  logResponseBody: true,
  // other parameters ...
});
```

## Parameters

The following configuration parameters are available.

| Parameter            | Description                                                                                                                            | Type       | Default |
| :------------------- | :------------------------------------------------------------------------------------------------------------------------------------- | :--------- | :------ |
| `enabled`            | Whether to enable the Apitally integration.                                                                                            | `boolean`  | `true`  |
| `logRequestHeaders`  | Whether to include request headers in the logs. Default masking for common sensitive headers (e.g. `Authorization`) applies.           | `boolean`  | `false` |
| `logRequestBody`     | Whether to include the request body in the logs. Only JSON and text are supported, up to 10 KB.                                        | `boolean`  | `false` |
| `logResponseHeaders` | Whether to include response headers in the logs.                                                                                       | `boolean`  | `true`  |
| `logResponseBody`    | Whether to include the response body in the logs. Only JSON and text are supported, up to 10 KB.                                       | `boolean`  | `false` |
| `maskHeaders`        | Array of regular expressions for matching headers to mask. These are in addition to the default masking patterns.                      | `RegExp[]` | `[]`    |
| `maskBodyFields`     | Array of regular expressions for matching request/response body fields to mask. These are in addition to the default masking patterns. | `RegExp[]` | `[]`    |
| `excludePaths`       | Array of regular expressions for matching paths to exclude from logging.                                                               | `RegExp[]` | `[]`    |
