MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / track

Method track

packages/cli/src/telemetry.ts:60–83  ·  view source on GitHub ↗
(event: TelemetryEvents, properties: Record<string, unknown> = {})

Source from the content-addressed store, hash-verified

58 }
59
60 track(event: TelemetryEvents, properties: Record<string, unknown> = {}) {
61 if (this.mixpanel) {
62 const payload = {
63 distinct_id: this.hostId,
64 session: this.sessionid,
65 time: new Date(),
66 $os: this._os_type,
67 osType: this._os_type,
68 osRelease: this._os_release,
69 osPlatform: this._os_platform,
70 osArch: this._os_arch,
71 osVersion: this._os_version,
72 nodeVersion: process.version,
73 version: this.version,
74 prismaVersion: this.prismaVersion,
75 isDocker: this.isDocker,
76 isWsl: this.isWsl,
77 isContainer: this.isContainer,
78 isCi: this.isCi,
79 ...properties,
80 };
81 this.mixpanel.track(event, payload);
82 }
83 }
84
85 trackError(err: Error) {
86 this.track('cli:error', {

Callers 2

trackErrorMethod · 0.95
trackSpanMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected