Home /

docs

Telemetry

@farming-labs/docs includes limited production telemetry so Farming Labs can understand which frameworks, deployments, and agent-optimized features are used in real projects.

Telemetry is separate from Analytics. Analytics is a project-owned event stream for page views, search, Ask AI, feedback, and MCP usage. Telemetry is a low-volume maintainer signal for package adoption and coarse feature usage.

Opt Out

Disable telemetry with an environment variable:

.env.local
DOCS_TELEMETRY=false
# or
DOCS_TELEMETRY_DISABLED=1

Or disable it in docs.config.ts:

docs.config.ts
export default defineDocs({
  telemetry: false,
});

Environment opt-out wins over config. Telemetry delivery failures are ignored and never affect rendering, builds, routing, search, Ask AI, or MCP behavior.

What Telemetry Includes

Telemetry may include:

  • an anonymous project identity hash derived by the ingestion service from stable project metadata
  • package name and version
  • framework adapter, such as Next.js, TanStack Start, SvelteKit, Astro, or Nuxt
  • production/runtime and deployment provider signals
  • public site origin or deployment URL when available
  • enabled feature flags such as search, Ask AI, MCP, llms.txt, page actions, feedback, sitemap, robots, API reference, static export, changelog, Docs Cloud, and Docs Review
  • coarse agent-surface usage such as markdown, llms, agents, skill, agent_spec, agent_feedback_submit, ask_ai, mcp, and MCP tool names

Telemetry does not collect:

  • visitor identities
  • end-user page views
  • device fingerprints
  • search queries
  • Ask AI questions
  • feedback comments
  • copied code or markdown content
  • documentation source content
  • cookies or cross-site tracking identifiers
  • per-user sessions

Local development origins are ignored even when telemetry is explicitly enabled. This includes localhost, *.localhost, the 127.0.0.0/8 loopback range, and IPv6 loopback or wildcard binding addresses. Events from those origins are not sent or stored, and historical local origins are not shown in the telemetry dashboard.

Options

docs.config.ts
export default defineDocs({
  telemetry: {
    enabled: true,
  },
});
OptionTypeDefault
enabledbooleanproduction-only enabled
siteOriginstringrequest/deployment origin
endpointstringFarming Labs ingestion endpoint

Use siteOrigin when production requests should be grouped under a stable custom domain:

docs.config.ts
export default defineDocs({
  telemetry: {
    siteOrigin: "https://docs.example.com",
  },
});

Use endpoint only for self-hosting, local verification, or tests:

docs.config.ts
export default defineDocs({
  telemetry: {
    endpoint: "https://telemetry.example.com/events",
  },
});

If a self-hosted ingestion endpoint requires a shared key, set the same environment variable in the docs runtime and the ingestion app:

.env
DOCS_TELEMETRY_INGEST_KEY=your-shared-ingest-key

When present, telemetry requests include the key as x-docs-telemetry-key. Failed telemetry requests are still ignored by the docs runtime.

The ingestion service computes the anonymous identity hash server-side. Clients do not send a device id, cookie, browser fingerprint, or session id; the hash exists only to group repeated telemetry events from the same docs project/site.

For self-hosted ingestion, set DOCS_TELEMETRY_IDENTITY_SALT on the ingestion service to derive the identity hash with HMAC-SHA256. Without it, ingestion uses a deterministic SHA-256 hash.

Customize
Live preview on these docs
Reset
Customize
Export Code
Preset
Explore more themes
Primary Color
Primary
Colors
Background
Foreground
Muted Text
Border
Card
Muted BG
Ring
Layout
SidebarBordered
TOC StyleDirectional (tree)
TOC DepthH2 + H3
Ask AI
ModeFloating
Floating StyleFull Modal
PositionBottom Right
Features