Skip to content

Commit 5702b85

Browse files
Kartik Rajeleanorjboyd
Kartik Raj
authored andcommitted
Remove API telemetry containing extension display name (microsoft#19895)
Just the extension ID is sufficient.
1 parent dc4a09b commit 5702b85

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

src/client/deprecatedProposedApi.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
} from './deprecatedProposedApiTypes';
1414
import { IInterpreterService } from './interpreter/contracts';
1515
import { IServiceContainer } from './ioc/types';
16+
import { traceVerbose } from './logging';
1617
import { PythonEnvInfo } from './pythonEnvironments/base/info';
1718
import { getEnvPath } from './pythonEnvironments/base/info/env';
1819
import { GetRefreshEnvironmentsOptions, IDiscoveryAPI } from './pythonEnvironments/base/locator';
@@ -68,13 +69,13 @@ export function buildDeprecatedProposedApi(
6869
}
6970
extensions
7071
.determineExtensionFromCallStack()
71-
.then((info) =>
72+
.then((info) => {
7273
sendTelemetryEvent(EventName.PYTHON_ENVIRONMENTS_API, undefined, {
7374
apiName,
7475
extensionId: info.extensionId,
75-
displayName: info.displayName,
76-
}),
77-
)
76+
});
77+
traceVerbose(`Extension ${info.extensionId} accessed ${apiName}`);
78+
})
7879
.ignoreErrors();
7980
}
8081

src/client/proposedApi.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { PythonEnvInfo, PythonEnvKind, PythonEnvType } from './pythonEnvironment
2323
import { getEnvPath } from './pythonEnvironments/base/info/env';
2424
import { IDiscoveryAPI } from './pythonEnvironments/base/locator';
2525
import { IPythonExecutionFactory } from './common/process/types';
26-
import { traceError } from './logging';
26+
import { traceError, traceVerbose } from './logging';
2727
import { normCasePath } from './common/platform/fs-paths';
2828
import { sendTelemetryEvent } from './telemetry';
2929
import { EventName } from './telemetry/constants';
@@ -108,13 +108,13 @@ export function buildProposedApi(
108108
function sendApiTelemetry(apiName: string) {
109109
extensions
110110
.determineExtensionFromCallStack()
111-
.then((info) =>
111+
.then((info) => {
112112
sendTelemetryEvent(EventName.PYTHON_ENVIRONMENTS_API, undefined, {
113113
apiName,
114114
extensionId: info.extensionId,
115-
displayName: info.displayName,
116-
}),
117-
)
115+
});
116+
traceVerbose(`Extension ${info.extensionId} accessed ${apiName}`);
117+
})
118118
.ignoreErrors();
119119
}
120120
disposables.push(

src/client/telemetry/index.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -1115,18 +1115,14 @@ export interface IEventNamePropertyMapping {
11151115
/* __GDPR__
11161116
"python_environments_api" : {
11171117
"extensionId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": false , "owner": "karrtikr"},
1118-
"displayName" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": false, "owner": "karrtikr" }
1118+
"apiName" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": false, "owner": "karrtikr" }
11191119
}
11201120
*/
11211121
[EventName.PYTHON_ENVIRONMENTS_API]: {
11221122
/**
11231123
* The ID of the extension calling the API.
11241124
*/
11251125
extensionId: string;
1126-
/**
1127-
* The name of the extension as displayed in marketplace.
1128-
*/
1129-
displayName: string;
11301126
/**
11311127
* The name of the API called.
11321128
*/

0 commit comments

Comments
 (0)