new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

Better Auth · Reference · all subjects

instrumentation & telemetry

18 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

No PII or secrets collected in telemetry

Telemetry does not collect emails, usernames, tokens, secrets, client IDs, client secrets, or database URLs.

Telemetry disabled by default

Telemetry collection is optional and disabled by default in Better Auth. Users must explicitly enable it.

Telemetry availability since version

Telemetry collection was introduced in Better Auth v1.3.5.

Telemetry collection enabled via config option

Telemetry can be enabled by setting telemetry.enabled to true in the betterAuth configuration object: export const auth = betterAuth({ telemetry: { enabled: true } });

Telemetry collection enabled via environment variable

Telemetry can be enabled or disabled using the BETTER_AUTH_TELEMETRY environment variable. Set BETTER_AUTH_TELEMETRY=1 to enable or BETTER_AUTH_TELEMETRY=0 to disable.

Telemetry debug mode configuration

Debug mode for telemetry can be enabled by setting telemetry.debug to true in the betterAuth config, or by setting the BETTER_AUTH_TELEMETRY_DEBUG=1 environment variable. In debug mode, telemetry events are logged only to the console: export const auth = betterAuth({ telemetry: { debug: true } });

Anonymous identifier for telemetry de-duplication

An anonymous identifier is a non-reversible hash derived from your project's package.json name and optionally baseURL. This allows de-duplication of events per project without revealing project identity.

Runtime information collected in telemetry

Runtime data collected includes the runtime name (node, bun, or deno) and version number.

Environment detection for telemetry

Environment information is collected and identifies one of: development, production, test, or ci.

Framework detection in telemetry

Framework information is collected if detected, including name and version for frameworks like Next.js, Nuxt, React Router, Astro, SvelteKit, and others.

Database detection in telemetry

Database information is collected if detected, including name and version for integrations like PostgreSQL, MySQL, SQLite, Prisma, Drizzle, MongoDB, and others.

System information collected in telemetry

System information includes platform, OS release, architecture, CPU count/model/speed, total memory, and flags such as isDocker, isWSL, and isTTY.

Package manager detection for telemetry

Package manager information is collected, including name and version derived from the npm user agent.

Redacted auth config snapshot in telemetry

A minimized, privacy-preserving view of betterAuth options is included in telemetry data, produced by the getTelemetryAuthConfig function. The full configuration is never sent.

CLI telemetry events: generate

CLI generate telemetry collects the event type cli_generate with outcomes: generated, overwritten, appended, no_changes, or aborted, plus redacted config.

CLI telemetry events: migrate

CLI migrate telemetry collects the event type cli_migrate with outcomes: migrated, no_changes, aborted, or unsupported_adapter, plus adapter id (when relevant) and redacted config.

Telemetry disabled in test environment by default

Telemetry is automatically disabled when NODE_ENV=test unless explicitly overridden by internal tooling.

Telemetry send timing: initialization and CLI

Telemetry is sent on betterAuth initialization with type 'init' and on CLI actions (generate and migrate).

Give your agent this brain