src/vs/platform/telemetry/node/1dsAppender.ts/OneDataSystemAppender/constructor
class OneDataSystemAppender:	constructor(
		eventPrefix: string,
		defaultData: { [key: string]: any } | null,
		iKeyOrClientFactory: string | (() => AppInsightsCore), // allow factory function for testing
	) {
		// Override the way events get sent since node doesn't have XHTMLRequest
		const customHttpXHROverride: IXHROverride = {
			sendPOST: (payload: IPayloadData, oncomplete) => {
				const options = {
					method: 'POST',
					headers: {
						...payload.headers,
						'Content-Type': 'application/json',
						'Content-Length': Buffer.byteLength(payload.data)
					}
				};
				try {
					const req = https.request(payload.urlString, options, res => {
						res.on('data', function (responseData) {
							oncomplete(res.statusCode ?? 200, res.headers as Record<string, any>, responseData.toString());
						});
						// On response with error send status of 0 and a blank response to oncomplete so we can retry events
						res.on('error', function (err) {
							oncomplete(0, {});
						});
					});
					req.write(payload.data);
					req.end();
				} catch {
					// If it errors out, send status of 0 and a blank response to oncomplete so we can retry events
					oncomplete(0, {});
				}
			}
		};

		super(eventPrefix, defaultData, iKeyOrClientFactory, customHttpXHROverride);
	}