@sussudio/platform
Version:
Internal APIs for VS Code's service injection the base services.
16 lines (15 loc) • 917 B
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AbstractOneDataSystemAppender } from '../common/1dsAppender.mjs';
export class OneDataSystemWebAppender extends AbstractOneDataSystemAppender {
constructor(isInternalTelemetry, eventPrefix, defaultData, iKeyOrClientFactory) {
super(isInternalTelemetry, eventPrefix, defaultData, iKeyOrClientFactory);
// If we cannot fetch the endpoint it means it is down and we should not send any telemetry.
// This is most likely due to ad blockers
fetch(this.endPointHealthUrl, { method: 'GET' }).catch((err) => {
this._aiCoreOrKey = undefined;
});
}
}