[PR #7578] [MERGED] chore(telemetry): move endpoint to env #15661

Closed
opened 2026-04-13 10:09:42 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7578
Author: @himself65
Created: 1/23/2026
Status: Merged
Merged: 1/23/2026
Merged by: @himself65

Base: canaryHead: himself65/2026/01/23/move-telemetry


📝 Commits (7)

  • 8c7d309 chore(telemetry): move endpoint to env
  • 27636fc ci: update
  • 572c158 chore: update config
  • 9d89d95 chore: lint fix
  • dc81b34 test(telemetry): add test for undefined BETTER_AUTH_TELEMETRY_ENDPOINT
  • 2e6a55c fix(telemetry): add guard for undefined endpoint in track function
  • c5ec9dd test(telemetry): use vi.stubEnv instead of delete for env var mocking

📊 Changes

8 files changed (+70 additions, -36 deletions)

View changed files

📝 .github/workflows/ci.yml (+6 -11)
📝 .github/workflows/e2e.yml (+6 -16)
📝 .github/workflows/preview.yml (+6 -4)
📝 .github/workflows/release.yml (+7 -0)
📝 packages/core/src/env/env-impl.ts (+2 -2)
📝 packages/core/tsdown.config.ts (+2 -0)
📝 packages/telemetry/src/index.ts (+12 -3)
📝 packages/telemetry/src/telemetry.test.ts (+29 -0)

📄 Description

Summary by cubic

Moved telemetry endpoint to an environment variable and removed the hardcoded default. Telemetry safely no-ops when no endpoint is set, allowing opt-out or custom endpoints.

  • Migration
    • Set BETTER_AUTH_TELEMETRY_ENDPOINT in your build/runtime env to enable telemetry.
    • Leave it unset to disable telemetry (no network calls).

Written for commit c5ec9dde35. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7578 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/23/2026 **Status:** ✅ Merged **Merged:** 1/23/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2026/01/23/move-telemetry` --- ### 📝 Commits (7) - [`8c7d309`](https://github.com/better-auth/better-auth/commit/8c7d3091a4e7aedf5aa985f6872f083f8814fa64) chore(telemetry): move endpoint to env - [`27636fc`](https://github.com/better-auth/better-auth/commit/27636fc3c516f3367496e67a7f7261c0417d77e0) ci: update - [`572c158`](https://github.com/better-auth/better-auth/commit/572c158621e213f27ed6b13872285396e38644f5) chore: update config - [`9d89d95`](https://github.com/better-auth/better-auth/commit/9d89d95b93d119e7a729f656a4641e2b9a1dd403) chore: lint fix - [`dc81b34`](https://github.com/better-auth/better-auth/commit/dc81b34d95bf0a5d37a633f0a6592b09d971502e) test(telemetry): add test for undefined BETTER_AUTH_TELEMETRY_ENDPOINT - [`2e6a55c`](https://github.com/better-auth/better-auth/commit/2e6a55c1c455c3b35d00f7734654d0b939a129f0) fix(telemetry): add guard for undefined endpoint in track function - [`c5ec9dd`](https://github.com/better-auth/better-auth/commit/c5ec9dde358115e8803b2d791af2668252d8dff4) test(telemetry): use vi.stubEnv instead of delete for env var mocking ### 📊 Changes **8 files changed** (+70 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+6 -11) 📝 `.github/workflows/e2e.yml` (+6 -16) 📝 `.github/workflows/preview.yml` (+6 -4) 📝 `.github/workflows/release.yml` (+7 -0) 📝 `packages/core/src/env/env-impl.ts` (+2 -2) 📝 `packages/core/tsdown.config.ts` (+2 -0) 📝 `packages/telemetry/src/index.ts` (+12 -3) 📝 `packages/telemetry/src/telemetry.test.ts` (+29 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Moved telemetry endpoint to an environment variable and removed the hardcoded default. Telemetry safely no-ops when no endpoint is set, allowing opt-out or custom endpoints. - **Migration** - Set BETTER_AUTH_TELEMETRY_ENDPOINT in your build/runtime env to enable telemetry. - Leave it unset to disable telemetry (no network calls). <sup>Written for commit c5ec9dde358115e8803b2d791af2668252d8dff4. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 10:09:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#15661