{"record":{"id":"5f99a1280bd7c937","repo":"immich-app/immich","slug":"invalid-telemetry-found-telemetry","errorCode":null,"errorMessage":"Invalid telemetry found: ${telemetry}","messagePattern":"Invalid telemetry found: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/repositories/config.repository.ts","lineNumber":225,"sourceCode":"  const redisUrl = dto.REDIS_URL;\n  if (redisUrl && redisUrl.startsWith('ioredis://')) {\n    try {\n      redisConfig = JSON.parse(Buffer.from(redisUrl.slice(10), 'base64').toString());\n    } catch (error) {\n      throw new Error('Failed to decode redis options', { cause: error });\n    }\n  }\n\n  const includedTelemetries =\n    dto.IMMICH_TELEMETRY_INCLUDE === 'all'\n      ? new Set(Object.values(ImmichTelemetry))\n      : asSet<ImmichTelemetry>(dto.IMMICH_TELEMETRY_INCLUDE, []);\n\n  const excludedTelemetries = asSet<ImmichTelemetry>(dto.IMMICH_TELEMETRY_EXCLUDE, []);\n  const telemetries = setDifference(includedTelemetries, excludedTelemetries);\n  for (const telemetry of telemetries) {\n    if (!TELEMETRY_TYPES.has(telemetry)) {\n      throw new Error(`Invalid telemetry found: ${telemetry}`);\n    }\n  }\n\n  const databaseConnection: DatabaseConnectionParams = dto.DB_URL\n    ? { connectionType: 'url', url: dto.DB_URL }\n    : {\n        connectionType: 'parts',\n        host: dto.DB_HOSTNAME || 'database',\n        port: dto.DB_PORT || 5432,\n        username: dto.DB_USERNAME || 'postgres',\n        password: dto.DB_PASSWORD || 'postgres',\n        database: dto.DB_DATABASE_NAME || 'immich',\n        ssl: dto.DB_SSL_MODE || undefined,\n      };\n\n  let vectorExtension: VectorExtension | undefined;\n  if (dto.DB_VECTOR_EXTENSION) {\n    switch (dto.DB_VECTOR_EXTENSION) {","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/immich-app/immich/blob/e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c/server/src/repositories/config.repository.ts#L207-L243","documentation":"IMMICH_TELEMETRY_INCLUDE/EXCLUDE are parsed into telemetry-name sets and each resulting value is validated against TELEMETRY_TYPES. If an included-minus-excluded telemetry name is not a known ImmichTelemetry value, startup throws with the invalid name.","triggerScenarios":"IMMICH_TELEMETRY_INCLUDE (or EXCLUDE after 'all' handling) contains a token not in the ImmichTelemetry enum, e.g. 'metrics', 'otel', 'tracing', or a case-mismatched 'API' instead of the valid values (e.g. 'api', 'io', 'host').","commonSituations":"Users enabling OpenTelemetry by guess-writing names; pluralizing ('hosts'); copying flags from another project's telemetry config; version drift where a telemetry kind was renamed or removed in immich.","solutions":["Use only valid ImmichTelemetry values (see the enum in server/src): typically 'api', 'io', 'host' — set IMMICH_TELEMETRY_INCLUDE=all to enable everything instead of guessing names","Fix casing/pluralization: IMMICH_TELEMETRY_INCLUDE=api,host","If you meant OpenTelemetry-style tracing, that is not an immich telemetry kind — remove the token or use IMMICH_TELEMETRY_INCLUDE=all","Check the enum for the installed immich version in case names changed"],"exampleFix":"// before\nIMMICH_TELEMETRY_INCLUDE=metrics,tracing\n// after\nIMMICH_TELEMETRY_INCLUDE=all\n# or\nIMMICH_TELEMETRY_INCLUDE=api,io,host","handlingStrategy":"validation","validationCode":"const TELEMETRY = new Set(['api', 'io', 'host']);\nconst include = process.env.IMMICH_TELEMETRY_INCLUDE;\nif (include && include !== 'all') {\n  const bad = include.split(',').filter(t => !TELEMETRY.has(t));\n  if (bad.length) throw new Error(`Unknown telemetry: ${bad.join(',')} — valid: ${[...TELEMETRY].join(',')} or 'all'`);\n}","typeGuard":"const isTelemetry = (t: string): t is 'api' | 'io' | 'host' => ['api', 'io', 'host'].includes(t);","tryCatchPattern":"try { start(); } catch (e) { if ((e as Error).message.startsWith('Invalid telemetry found:')) { console.error(`Use IMMICH_TELEMETRY_INCLUDE=all or valid kinds (api, io, host). ${(e as Error).message}`); process.exit(1); } throw e; }","preventionTips":["Use IMMICH_TELEMETRY_INCLUDE=all instead of enumerating names you are unsure of","Confirm exact kind names from the ImmichTelemetry enum in your immich version","Avoid OpenTelemetry-flavored names (metrics/tracing) — they are not valid values here","Keep telemetry flags consistent between INCLUDE and EXCLUDE to avoid surprises"],"tags":["config","env","telemetry","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c","analyzedAt":"2026-09-15T07:20:19.675Z","contentChangedAt":"2026-09-15T07:20:19.675Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}