Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/backend/metrics/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@ export interface AccountDropdownPortfolioClicked {
sensitiveProperties?: never
}

export interface HyperPlayExited {
event: 'HyperPlay Exited'
properties?: never
sensitiveProperties?: never
}

export type PossibleMetricPayloads =
| MetricsOptIn
| MetricsOptOut
Expand Down Expand Up @@ -467,5 +473,6 @@ export type PossibleMetricPayloads =
| PatchingFailed
| PatchingTooSlow
| AccountDropdownPortfolioClicked
| HyperPlayExited

export type PossibleMetricEventNames = PossibleMetricPayloads['event']
2 changes: 2 additions & 0 deletions src/backend/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import {
} from './utils/systeminfo/gpu/pci_ids'
import { copyFile, lstat, mkdir, readdir } from 'fs/promises'
import { GameConfig } from './game_config'
import { trackEvent } from './metrics/metrics'

const execAsync = promisify(exec)

Expand Down Expand Up @@ -260,6 +261,7 @@ async function handleExit() {
// Kill all child processes
callAllAbortControllers()
}
trackEvent({ event: 'HyperPlay Exited' })
app.exit()
}

Expand Down
Loading