[PR #1176] [CLOSED] chore: collect data for self hosted instances #1446

Closed
opened 2026-02-26 19:33:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1176
Author: @ephraimduncan
Created: 6/4/2024
Status: Closed

Base: mainHead: feat/telemetry


📝 Commits (6)

  • c1cc242 chore: collect data for self hosted instances
  • 0dfc41f chore: use instrumentation hook for telemetry
  • bafaf3b feat: register user instance
  • cb981bf feat: use dynamic version instead of hardcodded version
  • 8b344f5 fix: typoc
  • e79ba8a fix: build errors based on typeS

📊 Changes

14 files changed (+146 additions, -34 deletions)

View changed files

📝 .env.example (+3 -0)
📝 apps/web/next.config.js (+1 -0)
📝 apps/web/src/app/(dashboard)/admin/site-settings/page.tsx (+5 -4)
📝 apps/web/src/components/(dashboard)/layout/banner.tsx (+3 -6)
📝 apps/web/src/components/(dashboard)/settings/webhooks/trigger-multiselect-combobox.tsx (+1 -1)
apps/web/src/instrumentation.ts (+9 -0)
📝 packages/lib/server-only/site-settings/schema.ts (+5 -2)
packages/lib/server-only/site-settings/schemas/telemetry.ts (+20 -0)
📝 packages/lib/server-only/site-settings/upsert-site-setting.ts (+1 -1)
packages/lib/server-only/telemetry/register-instance.ts (+46 -0)
packages/lib/server-only/telemetry/send-instance.ts (+38 -0)
📝 packages/trpc/server/admin-router/schema.ts (+2 -2)
📝 packages/tsconfig/process-env.d.ts (+3 -0)
📝 turbo.json (+9 -18)

📄 Description

Description

Introduces functionality to collect data for self-hosted instances with an option to disable it through environment variables.

Changes Made

  • Added a new environment variable DISABLE_TELEMETRY to control telemetry data collection.
  • Send instance information to an external server at the start of the application

Testing Performed

  • Tested the telemetry sending functionality in a development environment.
  • Verified that the telemetry is not sent when DISABLE_TELEMETRY is set to true.

Checklist

  • I have tested these changes locally and they work as expected.
  • I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

Summary by CodeRabbit

  • New Features

    • Introduced telemetry configuration options in the settings schema.
    • Added functionality to register and send telemetry data.
  • Improvements

    • Enhanced the Banner component to filter site settings based on specific criteria.
    • Simplified and optimized the turbo.json configuration file.
  • Bug Fixes

    • Corrected import statements in various components for better code reliability.
  • Configuration

    • Added DISABLE_TELEMETRY and NEXT_RUNTIME environment variables.
    • Enabled experimental instrumentationHook in the next.config.js file.

🔄 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/documenso/documenso/pull/1176 **Author:** [@ephraimduncan](https://github.com/ephraimduncan) **Created:** 6/4/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/telemetry` --- ### 📝 Commits (6) - [`c1cc242`](https://github.com/documenso/documenso/commit/c1cc2425279e3b83a94b658463be3134e1863f4a) chore: collect data for self hosted instances - [`0dfc41f`](https://github.com/documenso/documenso/commit/0dfc41f423a32dffc510274adfcd9d46b062eee1) chore: use instrumentation hook for telemetry - [`bafaf3b`](https://github.com/documenso/documenso/commit/bafaf3b95ea23d049dc9e4cf19ebd0b95882a68a) feat: register user instance - [`cb981bf`](https://github.com/documenso/documenso/commit/cb981bffb763555fc2416ca68d75bd565c345920) feat: use dynamic version instead of hardcodded version - [`8b344f5`](https://github.com/documenso/documenso/commit/8b344f5c96113b6e3179c5a9ab83dd5165eba4c2) fix: typoc - [`e79ba8a`](https://github.com/documenso/documenso/commit/e79ba8aa680b9bc73df0552caaa68efe5a7c9c13) fix: build errors based on typeS ### 📊 Changes **14 files changed** (+146 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+3 -0) 📝 `apps/web/next.config.js` (+1 -0) 📝 `apps/web/src/app/(dashboard)/admin/site-settings/page.tsx` (+5 -4) 📝 `apps/web/src/components/(dashboard)/layout/banner.tsx` (+3 -6) 📝 `apps/web/src/components/(dashboard)/settings/webhooks/trigger-multiselect-combobox.tsx` (+1 -1) ➕ `apps/web/src/instrumentation.ts` (+9 -0) 📝 `packages/lib/server-only/site-settings/schema.ts` (+5 -2) ➕ `packages/lib/server-only/site-settings/schemas/telemetry.ts` (+20 -0) 📝 `packages/lib/server-only/site-settings/upsert-site-setting.ts` (+1 -1) ➕ `packages/lib/server-only/telemetry/register-instance.ts` (+46 -0) ➕ `packages/lib/server-only/telemetry/send-instance.ts` (+38 -0) 📝 `packages/trpc/server/admin-router/schema.ts` (+2 -2) 📝 `packages/tsconfig/process-env.d.ts` (+3 -0) 📝 `turbo.json` (+9 -18) </details> ### 📄 Description ## Description Introduces functionality to collect data for self-hosted instances with an option to disable it through environment variables. ## Changes Made - Added a new environment variable DISABLE_TELEMETRY to control telemetry data collection. - Send instance information to an external server at the start of the application ## Testing Performed - Tested the telemetry sending functionality in a development environment. - Verified that the telemetry is not sent when DISABLE_TELEMETRY is set to true. ## Checklist - [x] I have tested these changes locally and they work as expected. - [ ] I have added/updated tests that prove the effectiveness of these changes. - [ ] I have updated the documentation to reflect these changes, if applicable. - [x] I have followed the project's coding style guidelines. - [ ] I have addressed the code review feedback from the previous submission, if applicable. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced telemetry configuration options in the settings schema. - Added functionality to register and send telemetry data. - **Improvements** - Enhanced the `Banner` component to filter site settings based on specific criteria. - Simplified and optimized the `turbo.json` configuration file. - **Bug Fixes** - Corrected import statements in various components for better code reliability. - **Configuration** - Added `DISABLE_TELEMETRY` and `NEXT_RUNTIME` environment variables. - Enabled experimental `instrumentationHook` in the `next.config.js` file. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:33:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1446
No description provided.