We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9109cf commit 4209277Copy full SHA for 4209277
1 file changed
src/client/environmentApi.ts
@@ -134,10 +134,14 @@ export function buildEnvironmentApi(
134
extensions
135
.determineExtensionFromCallStack()
136
.then((info) => {
137
- sendTelemetryEvent(EventName.PYTHON_ENVIRONMENTS_API, undefined, {
138
- apiName,
139
- extensionId: info.extensionId,
140
- });
+ const p = Math.random();
+ if (p <= 0.001) {
+ // Only send API telemetry 1% of the time, as it can be chatty.
+ sendTelemetryEvent(EventName.PYTHON_ENVIRONMENTS_API, undefined, {
141
+ apiName,
142
+ extensionId: info.extensionId,
143
+ });
144
+ }
145
traceVerbose(`Extension ${info.extensionId} accessed ${apiName} with args: ${JSON.stringify(args)}`);
146
})
147
.ignoreErrors();
0 commit comments