Skip to content

⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.

chore(worker): report the build name in telemetry (#719)

Croff265457e5cea4
diff --git a/TELEMETRY.md b/TELEMETRY.md
index 72a3ec46..09b47a17 100644
--- a/TELEMETRY.md
+++ b/TELEMETRY.md
@@ -43,6 +43,8 @@ The worker logs the exact body before each send.
- The day the instance was installed, taken from the timestamp of its first database
migration.
- The running version.
+- The build: which edition the images come from, `community` or `pro`. Not whether a
+ license is active, and nothing from the license.
- The runtime: Bun version, OS and architecture, Postgres major version, whether it
runs in Docker.
- How many users, projects and issues there are, plus how many users signed in and how
diff --git a/apps/worker/Dockerfile b/apps/worker/Dockerfile
index f443dde1..ebb48976 100644
--- a/apps/worker/Dockerfile
+++ b/apps/worker/Dockerfile
@@ -31,6 +31,9 @@ RUN bun install --frozen-lockfile --filter worker $INSTALL_FLAGS
# does not clobber the copied dependencies.
FROM base AS release
ENV NODE_ENV=production
+# The build telemetry reports. An extending build passes its own name.
+ARG BUILD_NAME=community
+ENV BUILD_NAME=$BUILD_NAME
COPY --from=install /app ./
COPY . .
diff --git a/apps/worker/src/__tests__/unit/telemetry-payload.test.ts b/apps/worker/src/__tests__/unit/telemetry-payload.test.ts
index 80bf628c..01bef2c8 100644
--- a/apps/worker/src/__tests__/unit/telemetry-payload.test.ts
+++ b/apps/worker/src/__tests__/unit/telemetry-payload.test.ts
@@ -84,6 +84,7 @@ const input: PulseInput = {
day: '2026-07-27',
installedDay: '2026-07-10',
version: '0.5.0',
+ build: 'community',
bunVersion: '1.3.14',
docker: true,
platform: 'linux/arm64',
diff --git a/apps/worker/src/telemetry-payload.ts b/apps/worker/src/telemetry-payload.ts
index af9f5d31..dda1e844 100644
--- a/apps/worker/src/telemetry-payload.ts
+++ b/apps/worker/src/telemetry-payload.ts
@@ -50,6 +50,8 @@ export interface PulseInput {
day: string;
installedDay: string | null;
version: string;
+ // 'community', or the name of the extending build the worker image comes from.
+ build: string;
bunVersion: string;
docker: boolean;
// '<platform>/<arch>', e.g. 'linux/arm64'.
@@ -107,6 +109,7 @@ export function buildPulse(input: PulseInput) {
day: input.day,
installedDay: input.installedDay,
version: input.version,
+ build: input.build,
runtime: {
bun: input.bunVersion,
docker: input.docker,
diff --git a/apps/worker/src/telemetry.ts b/apps/worker/src/telemetry.ts
index f5c0a33a..b1625c3f 100644
--- a/apps/worker/src/telemetry.ts
+++ b/apps/worker/src/telemetry.ts
@@ -260,6 +260,12 @@ function identifiers(value: unknown): string[] {
.slice(0, MAX_IDENTIFIERS);
}
+// The worker image sets it and an operator can override it, so it is checked as the lists are.
+function buildName(): string {
+ const name = process.env.BUILD_NAME;
+ return name !== undefined && IDENTIFIER.test(name) ? name : 'community';
+}
+
interface Lists {
integrationKeys: string[];
gitProviders: string[];
@@ -352,6 +358,7 @@ export async function processTelemetry(): Promise<void> {
day,
installedDay: await installedDay(),
version: pkg.version,
+ build: buildName(),
bunVersion: Bun.version,
docker: existsSync('/.dockerenv'),
platform: `${process.platform}/${process.arch}`,