Sending Analytics Data for file Operation and LSP features#14683
Sending Analytics Data for file Operation and LSP features#14683shubhsnov merged 5 commits intoadobe:masterfrom niteskum:lspAnalyticsData
Conversation
src/editor/EditorStatusBar.js
Outdated
|
|
||
| HealthLogger.sendAnalyticsData( | ||
| "usagelanguageChange" + filelanguageName + fileType, | ||
| "usage", |
There was a problem hiding this comment.
@niteskum can all analytics strings be moved to another file as variables and use that variable everywhere needed?
There was a problem hiding this comment.
moved all common strings constant to HealthLogger.js as earlier all constants were defined in this file
| if (!docToSave) { | ||
| return; | ||
| } | ||
| var fileType = docToSave.language ? docToSave.language._name : ""; |
There was a problem hiding this comment.
@SnchitGrover Do we want an empty string here or something like "unknown"? Empty strings are sometimes treated as null values while serialization depending on platform. Depends on your use case.
There was a problem hiding this comment.
@niteskum Is there ever a possibility of not having the language property in a document object?
There was a problem hiding this comment.
@shubhsnov I think document will always have language. but since file save is critical operation , don't want to leave any space in code to trigger exception so I am doing null check.
src/utils/HealthLogger.js
Outdated
| if(fileSize === -1) { | ||
| subType = ""; | ||
| } | ||
| if(fileSize < 10) { |
There was a problem hiding this comment.
shouldn't the check be <=? if the file size is 10kb, it will log in 10_50KB range.
|
LGTM |
@shubhsnov @SnchitGrover please review
@narayani28