134
135
constructor(
137
>
private readonly _logService: ILogService,
138
>
private _endpointUrl: string = GH_TELEMETRY_URL,
139
>
private readonly _internalSink?: IAgentHostInternalTelemetrySink,
140
>
private readonly _fetchFn: FetchFn = globalThis.fetch,
141
>
) {
142
>
// Map the resolved common properties onto the GH property names the hydro schema reads.
143
>
this._commonProps = {
144
>
client_machineid: asString(commonProperties['common.machineId']),
145
>
client_deviceid: asString(commonProperties['common.devDeviceId']),
146
>
client_sessionid: asString(commonProperties['sessionID']),
147
>
common_os: asString(commonProperties['common.nodePlatform']) ?? process.platform,
148
>
editor_version: asString(commonProperties['version']),
149
>
};
150
>
}
151
152
sendGHTelemetryEvent(eventName: string, properties?: TelemetryProps, measurements?: TelemetryMeasurements): void {