Skip to main content
Hono
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.
ParameterDescriptionTypeDefault
enabledWhether to enable the Apitally integration.booleantrue
logRequestHeadersWhether to include request headers in the logs. Default masking for common sensitive headers (e.g. Authorization) applies.booleanfalse
logRequestBodyWhether to include the request body in the logs. Only JSON and text are supported, up to 10 KB.booleanfalse
logResponseHeadersWhether to include response headers in the logs.booleantrue
logResponseBodyWhether to include the response body in the logs. Only JSON and text are supported, up to 10 KB.booleanfalse
maskHeadersArray of regular expressions for matching headers to mask. These are in addition to the default masking patterns.RegExp[][]
maskBodyFieldsArray of regular expressions for matching request/response body fields to mask. These are in addition to the default masking patterns.RegExp[][]
excludePathsArray of regular expressions for matching paths to exclude from logging.RegExp[][]