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

Adding Analytics logging for JSRefactor, Live Preview, Quick Edit and more features - #14253

Merged
navch merged 2 commits into
adobe:masterfrom
sobisht:sobisht/Instrumentation-jsrefactor-livepreview-quickedit
May 7, 2018
Merged

Adding Analytics logging for JSRefactor, Live Preview, Quick Edit and more features#14253
navch merged 2 commits into
adobe:masterfrom
sobisht:sobisht/Instrumentation-jsrefactor-livepreview-quickedit

Conversation

@sobisht

@sobisht sobisht commented Apr 25, 2018

Copy link
Copy Markdown
Collaborator

This PR is related to adding analytics log for following features in brackets:

  1. JSRefactor:
  • Rename
  • TryCatch
  • WrapInCondition
  • ConvertToFunction
  • CreateGetterSetter
  • ExtractToVariable
  • ExtractToFunction
  1. QuickEdit: open

  2. QuickDoc:

  • Open
  • ReadMore
  1. Live Preview: Open

  2. Project Settings: Edit in url

  3. MultiCursor: Use

ping @swmitra @navch

Comment thread src/LiveDevelopment/LiveDevelopment.js Outdated
WebSocketTransport = require("LiveDevelopment/transports/WebSocketTransport"),
PreferencesManager = require("preferences/PreferencesManager");
PreferencesManager = require("preferences/PreferencesManager"),
HealthLogger = brackets.getModule("utils/HealthLogger");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please use require here

Comment thread src/LiveDevelopment/LiveDevelopment.js Outdated
"usage",
"livePreview",
"open",
""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is an optional param no need to send empty string.

/**
* Send analytics data for Quick Doc "readMore" action
*
* @return {type} [[Description]]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fill type and Description field in doc comment.

}
if (eventName) {
// Send analytics data for refactoring
HealthLogger.sendAnalyticsData(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We are not even checking whether we are in js context or not? These commands are available in all type of files. Do we just want capture click on the menu or successful usage of this feature?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added the check for JS context.

}

//Send analytics data for Quick Edit open
HealthLogger.sendAnalyticsData(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Again do we are just capturing quick edit performed. Are we interested in errors which we get in this operation?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

we just capture logging when quick edit is performed.

// Send analytics data for Quick Doc open
HealthLogger.sendAnalyticsData(
"cssQuickDoc",
"usage",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2nd param is event category? usage might not be the correct word. feature name should be there something like quickedit, multicursor, refactor etc

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@SnchitGrover would be able to clarify this.

@navch

navch commented Apr 25, 2018

Copy link
Copy Markdown
Contributor

Just one more question @sobisht
What is going to happen, if we are just running tests?

@sobisht

sobisht commented Apr 27, 2018

Copy link
Copy Markdown
Collaborator Author

@navch Since unit tests will call the entry functions. Logging will be sent for the unit tests also.

This item will be taken care in different PR.

@navch navch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @sobisht for this PR. I have restarted the build.

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