Closed ryanluker closed 3 years ago
@mattseddon found one issue upstream, so I will have to wait on this, sadly. https://github.com/microsoft/vscode-extension-telemetry/pull/69
@mattseddon Note that there was one last interesting learning https://github.com/ryanluker/vscode-coverage-gutters/pull/344/commits/1eff40328b16748c52a49996ae5094a932383ec3
Gotta make sure your tests don't trigger events to app insights hah...
@mattseddon oops! There was actually a couple issues with the above commit I mentioned. Better version below. https://github.com/ryanluker/vscode-coverage-gutters/commit/9e48acc88bb96e7d416c5e6529f507fc92b08f3a
@mattseddon oops! There was actually a couple issues with the above commit I mentioned. Better version below. 9e48acc
Thanks, will take a look later on today. Did you consider excluding debug sessions as well?
@mattseddon Hmmm I wasn't 100% sure how to access that and after looking through the telemetry module they already handled telemetry for yah (both IDE and cli). How where you thinking of excluding the debug sessions? https://code.visualstudio.com/api/references/vscode-api#env
They don't appear to expose if something is connected to a debugger unlike telemetry 🤔. Maybe we could use the same cli telemetry disable but also here in the launch.json
https://github.com/ryanluker/vscode-coverage-gutters/blob/master/.vscode/launch.json#L15.
They don't appear to expose if something is connected to a debugger unlike telemetry 🤔. Maybe we could use the same cli telemetry disable but also here in the
launch.json
https://github.com/ryanluker/vscode-coverage-gutters/blob/master/.vscode/launch.json#L15.
That should work, I have at least 6 different entry points to launch a VS Code instance that I don't want to send telemetry from so went with environment variables. This is the top of our send telemetry function:
export const sendTelemetryEvent = <
P extends IEventNamePropertyMapping,
E extends keyof P
>(
eventName: E,
properties: P[E]
) => {
if (isTestExecution() || isDebugSession()) {
return
}
For me this is more explicit (important when you have multiple people working in the code base) but I have to admit what you have looks (is) cleaner.
343
Work