Documentation
02Deployment

Analytics Engine

Enable Cloudflare Analytics Engine for request observability and configure read access.

Analytics Engine is InsightFlare's optional high-throughput analytical layer. It keeps request observation and traffic and event projections separate from the primary D1 database. Three datasets are bound by default:

BindingDatasetContent
REQUEST_ANALYTICSinsightflare_request_eventsRequest observation and abnormal traffic.
TRAFFIC_ANALYTICSinsightflare_traffic_eventsSampled traffic facts.
EVENT_ANALYTICSinsightflare_event_factsSampled custom event facts.

In the current version, the Request Observability page reads the request dataset. The traffic and event datasets are written for future analytics providers.

Enable Analytics Engine in Cloudflare

If you use Deploy, enable Analytics Engine and grant API token management permission during authorization. Deploy can create and configure an account-scoped read-only token. For an existing instance, return to Deploy and apply the update or configuration. Manual setup is also supported.

Analytics Engine must be enabled on your Cloudflare account before the bindings work. In the Cloudflare dashboard, open Workers & Pages, then Analytics Engine, and click Enable. After that, InsightFlare binds the datasets automatically during deployment.

If you deploy before enabling it, the deployment detects that the account has not enabled Analytics Engine (Cloudflare error code 10089) and retries without the analytics_engine_datasets bindings. It also sets INSIGHTFLARE_ANALYTICS_ENGINE_DISABLED=1. The Analytics Engine settings in InsightFlare are then locked and the Request Observability page tells you that Analytics Engine is not enabled. Enable Analytics Engine in Cloudflare, then redeploy.

Configure read access

Writing to Analytics Engine uses the Worker binding. Reading the datasets requires the Cloudflare API, so InsightFlare needs credentials:

  1. In the Cloudflare dashboard, copy your Account ID.
  2. Go to My Profile, then API Tokens, and create a Custom token.
  3. Grant the token Account Analytics read access, scoped to the current account.
  4. In InsightFlare, open System Settings, find Analytics Engine (in the Guide dialog this is walked through step by step), and enter the Account ID and API token.

Manually entered credentials are stored in the primary D1 database, encrypted with a key derived from MAIN_SECRET. Deleting the credentials makes the features that depend on Analytics Engine show that configuration is required.

Only system administrators can open System Settings.