New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add versions to telemetry #307

Merged
merged 3 commits into from Mar 16, 2018

Conversation

Projects
None yet
2 participants
@digeff
Copy link
Contributor

digeff commented Mar 16, 2018

Add versions to telemetry

We'll use this to add the debug adapter versions, and the browser user agent to telemetry

The code to add the browser user agent is on chrome-debug added on this PR: Microsoft/vscode-chrome-debug#621

}

public addCustomGlobalProperty(additionalGlobalPropertiesPromise: Promise<any> | any): void {
this._actionsQueue = this._actionsQueue.then(async () => {

This comment has been minimized.

@roblourens

roblourens Mar 16, 2018

Member

Here's a suggestion for a different implementation. It might get the intent across a little better since yours is acting like a queue here but doesn't really need to be. But it's not a big difference so I leave it up to you which one to use.

const reportedPropertyP = additionalGlobalPropertiesPromise.then(prop => this._telemetryReporter.addCustomGlobalProperty, err => this.reportErrorWhileWaitingForProperty(err);

this._actionsQueue = Promise.join(
	this._actionsQueue,
	reportedPropertyP)

This comment has been minimized.

@digeff

digeff Mar 16, 2018

Contributor

I'm using this suggestion with Promise.all

This comment has been minimized.

@roblourens

roblourens Mar 16, 2018

Member

Ah that's what I meant.

logger.log('vscode-chrome-debug-core: ' + require('../../../package.json').version);
const coreVersion = require('../../../package.json').version;
logger.log('vscode-chrome-debug-core: ' + coreVersion);
telemetry.addCustomGlobalProperty( { "Versions.DebugAdapterCore": coreVersion });

This comment has been minimized.

@roblourens

roblourens Mar 16, 2018

Member

Please use single quotes (trying to enforce this now, I need to set up the tslint rule)

This comment has been minimized.

@digeff

digeff Mar 16, 2018

Contributor

Changed

digeff added some commits Mar 16, 2018

@roblourens roblourens merged commit ab5a125 into Microsoft:master Mar 16, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla All CLA requirements met.
Details

@digeff digeff deleted the digeff:add_version_to_telemetry branch Mar 16, 2018

@roblourens roblourens added this to the March 2018 milestone Apr 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment