Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.

Add versions to telemetry#307

Merged
roblourens merged 3 commits intomicrosoft:masterfrom
digeff:add_version_to_telemetry
Mar 16, 2018
Merged

Add versions to telemetry#307
roblourens merged 3 commits intomicrosoft:masterfrom
digeff:add_version_to_telemetry

Conversation

@digeff
Copy link
Contributor

@digeff 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

src/telemetry.ts Outdated
}

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using this suggestion with Promise.all

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

@roblourens roblourens merged commit ab5a125 into microsoft:master Mar 16, 2018
@digeff digeff deleted the add_version_to_telemetry branch March 16, 2018 22:45
@roblourens roblourens added this to the March 2018 milestone Apr 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants