mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode 4d91d96e5e121b38d33508cdef17868bab255eae
This commit is contained in:
committed by
AzureDataStudio
parent
a971aee5bd
commit
5e7071e466
@@ -28,7 +28,7 @@ export interface ITelemetryService {
|
||||
*/
|
||||
readonly sendErrorTelemetry: boolean;
|
||||
|
||||
_serviceBrand: undefined;
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Sends a telemetry event that has been privacy approved.
|
||||
@@ -55,5 +55,4 @@ export const currentSessionDateStorageKey = 'telemetry.currentSessionDate';
|
||||
export const firstSessionDateStorageKey = 'telemetry.firstSessionDate';
|
||||
export const lastSessionDateStorageKey = 'telemetry.lastSessionDate';
|
||||
export const machineIdKey = 'telemetry.machineId';
|
||||
export const trueMachineIdKey = 'telemetry.trueMachineId';
|
||||
export const crashReporterIdStorageKey = 'crashReporter.guid';
|
||||
|
||||
@@ -20,7 +20,6 @@ export interface ITelemetryServiceConfig {
|
||||
sendErrorTelemetry?: boolean;
|
||||
commonProperties?: Promise<{ [name: string]: any }>;
|
||||
piiPaths?: string[];
|
||||
trueMachineId?: string;
|
||||
}
|
||||
|
||||
export class TelemetryService implements ITelemetryService {
|
||||
@@ -28,7 +27,7 @@ export class TelemetryService implements ITelemetryService {
|
||||
static readonly IDLE_START_EVENT_NAME = 'UserIdleStart';
|
||||
static readonly IDLE_STOP_EVENT_NAME = 'UserIdleStop';
|
||||
|
||||
_serviceBrand: undefined;
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
||||
private _appender: ITelemetryAppender;
|
||||
private _commonProperties: Promise<{ [name: string]: any; }>;
|
||||
@@ -76,13 +75,6 @@ export class TelemetryService implements ITelemetryService {
|
||||
usingFallbackGuid: { classification: 'SystemMetaData', purpose: 'BusinessInsight', isMeasurement: true };
|
||||
};
|
||||
this.publicLog2<{ usingFallbackGuid: boolean }, MachineIdFallbackClassification>('machineIdFallback', { usingFallbackGuid: !isHashedId });
|
||||
|
||||
if (config.trueMachineId) {
|
||||
type MachineIdDisambiguationClassification = {
|
||||
correctedMachineId: { endPoint: 'MacAddressHash', classification: 'EndUserPseudonymizedInformation', purpose: 'FeatureInsight' };
|
||||
};
|
||||
this.publicLog2<{ correctedMachineId: string }, MachineIdDisambiguationClassification>('machineIdDisambiguation', { correctedMachineId: config.trueMachineId });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { safeStringify } from 'vs/base/common/objects';
|
||||
import { isObject } from 'vs/base/common/types';
|
||||
|
||||
export const NullTelemetryService = new class implements ITelemetryService {
|
||||
_serviceBrand: undefined;
|
||||
declare readonly _serviceBrand: undefined;
|
||||
readonly sendErrorTelemetry = false;
|
||||
|
||||
publicLog(eventName: string, data?: ITelemetryData) {
|
||||
@@ -156,8 +156,8 @@ export function cleanRemoteAuthority(remoteAuthority?: string): string {
|
||||
}
|
||||
|
||||
let ret = 'other';
|
||||
// Whitelisted remote authorities
|
||||
['ssh-remote', 'dev-container', 'attached-container', 'wsl'].forEach((res: string) => {
|
||||
const allowedAuthorities = ['ssh-remote', 'dev-container', 'attached-container', 'wsl'];
|
||||
allowedAuthorities.forEach((res: string) => {
|
||||
if (remoteAuthority!.indexOf(`${res}+`) === 0) {
|
||||
ret = res;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class AppInsightsMock extends TelemetryClient {
|
||||
}
|
||||
|
||||
class TestableLogService extends AbstractLogService implements ILogService {
|
||||
_serviceBrand: undefined;
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
||||
public logs: string[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user