Honeycomb
Last updated Apr 21, 2026 The Honeycomb Pages Plugin automatically sends traces to Honeycomb for analysis and observability.
Installation
npmyarnpnpmbun
npm i @cloudflare/pages-plugin-honeycomb
yarn add @cloudflare/pages-plugin-honeycomb
pnpm add @cloudflare/pages-plugin-honeycomb
bun add @cloudflare/pages-plugin-honeycomb
Usage
The following usage example uses environment variables you will need to set in your Pages project settings.
import honeycombPlugin from "@cloudflare/pages-plugin-honeycomb";
export const onRequest: PagesFunction<{
HONEYCOMB_API_KEY: string;
HONEYCOMB_DATASET: string;
}> = (context) => {
return honeycombPlugin({
apiKey: context.env.HONEYCOMB_API_KEY,
dataset: context.env.HONEYCOMB_DATASET,
})(context);
};
Alternatively, you can hard-code (not advisable for API key) your settings the following way:
import honeycombPlugin from "@cloudflare/pages-plugin-honeycomb";
export const onRequest = honeycombPlugin({
apiKey: "YOUR_HONEYCOMB_API_KEY",
dataset: "YOUR_HONEYCOMB_DATASET_NAME",
});
This Plugin is based on the @cloudflare/workers-honeycomb-logger and accepts the same configuration options ↗︎.
Ensure that you enable the option to Automatically unpack nested JSON and set the Maximum unpacking depth to 5 in your Honeycomb dataset settings.

Additional context
data.honeycomb.tracer has two methods for attaching additional information about a given trace:
data.honeycomb.tracer.logwhich takes a single argument, aString.data.honeycomb.tracer.addDatawhich takes a single argument, an object of arbitrary data.
More information about these methods can be seen on @cloudflare/workers-honeycomb-logger's documentation ↗︎.
For example, if you wanted to use the addData method to attach user information:
import type { PluginData } from "@cloudflare/pages-plugin-honeycomb";
export const onRequest: PagesFunction<unknown, any, PluginData> = async ({
data,
next,
request,
}) => {
// Authenticate the user from the request and extract user's email address
const email = await getEmailFromRequest(request);
data.honeycomb.tracer.addData({ email });
return next();
};
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/pages/functions/plugins/honeycomb/#page","headline":"Honeycomb","description":"Send traces from Pages Functions to Honeycomb for observability using this Plugin.","url":"https://developers.cloudflare.com/pages/functions/plugins/honeycomb/","inLanguage":"en","image":"https://developers.cloudflare.com/pages/functions/plugins/honeycomb/og.png?v=42a7240aab81f0b2","dateModified":"2026-04-21","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Capture and log exceptions in Pages Functions using the Sentry Pages Plugin. title: Sentry image: https://developers.cloudflare.com/pages/functions/plugins/sentry/og.png?v=7bc37c1c53e4871e
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/pages/llms.txt
Use this file to discover all available pages before exploring further.
