Skip to content
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 telemetry wrapper for common operations. #71

Merged
merged 4 commits into from
Oct 18, 2018
Merged

Conversation

andxu
Copy link
Contributor

@andxu andxu commented Oct 17, 2018

No description provided.

@andxu
Copy link
Contributor Author

andxu commented Oct 17, 2018

#56

src/extension.ts Outdated
export function activate(context: ExtensionContext) {
Telemetry.sendEvent("activateExtension", {});
export async function activate(context: ExtensionContext): Promise<any> {
await initializeFromJsonFile(context.asAbsolutePath("./package.json"), true);
Copy link
Member

Choose a reason for hiding this comment

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

Make sure you are aware of the debug flag true here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch

@andxu andxu requested review from yaohaizh and SummerSun and removed request for yaohaizh October 17, 2018 08:50
commands.executeCommand("setContext", "extensionActivated", true);

Services.initialize(context);
Settings.initialize(context);

const projectController: ProjectController = new ProjectController(context);
context.subscriptions.push(commands.registerCommand(Commands.JAVA_PROJECT_CREATE, async () => { projectController.createJavaProject(); }));
const instrumented = instrumentOperation(Commands.JAVA_PROJECT_CREATE, () => projectController.createJavaProject());
Copy link
Member

Choose a reason for hiding this comment

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

By writing so, have you tested whether the "duration" is correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it functions well.

@andxu andxu merged commit e22a721 into master Oct 18, 2018
@Eskibear Eskibear deleted the andy_telemetry branch August 15, 2019 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants