Skip to content

Commit a428a54

Browse files
authored
chore: include appId in app diagnostics metrics payload (#514)
Closes #509
1 parent 20d122e commit a428a54

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

forge.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ const RENDERER_VITE_CONFIG_PATH = fileURLToPath(
115115
)
116116

117117
type CoMapeoDesktopForgePluginConfig = {
118+
appId: string
118119
appVersion: string
119120
win32AppUserModelId: string
120121
}
@@ -182,6 +183,7 @@ class CoMapeoDesktopForgePlugin extends PluginBase<CoMapeoDesktopForgePluginConf
182183
}
183184

184185
const appConfig: AppConfig = {
186+
appId: this.config.appId,
185187
appType: APP_TYPE,
186188
appVersion: this.config.appVersion,
187189
asar: ASAR,
@@ -334,6 +336,7 @@ const properties = getPropertiesForAppType(APP_TYPE)
334336

335337
const plugins: Array<ForgeConfigPlugin> = [
336338
new CoMapeoDesktopForgePlugin({
339+
appId: properties.appBundleId,
337340
appVersion: properties.appVersion,
338341
win32AppUserModelId: properties.win32AppUserModelId,
339342
}),

src/main/metrics/app-diagnostics-metrics.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export function createAppDiagnosticsMetricsScheduler({
4949
const { appLocale, deviceLocale } = getLocaleInfo()
5050

5151
return {
52+
appId: appConfig.appId,
5253
appLocale,
5354
appName: app.getName(),
5455
deviceLocale,

src/shared/app.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export type AppType =
99
| 'production'
1010

1111
export const AppConfigSchema = v.object({
12+
/** Indicates the application ID e.g. `app.comapeo` */
13+
appId: v.string(),
1214
/** Indicates the app type */
1315
appType: v.union([
1416
v.literal('development'),

0 commit comments

Comments
 (0)