-
Notifications
You must be signed in to change notification settings - Fork 35
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
Send telemetry events to telemetry plugin #115
Conversation
6269afb
to
f4bf54f
Compare
Signed-off-by: David Kwon <[email protected]>
f4bf54f
to
95faa7c
Compare
Signed-off-by: David Kwon <[email protected]>
95faa7c
to
b75bc2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the code/extensions/che-telemetry/telemetry-0.0.1.vsix
build artefact is not need there.
Signed-off-by: dkwon17 <[email protected]>
Thank you for the review @azatsarynnyy , I removed the duplicate files, updated the dependencies & extension description, and addressed the other feedback |
@dkwon17 there are still a couple of redundant files:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to test the changes in a bit different way.
I prepared a test repo https://github.com/azatsarynnyy/che-code/tree/telemetry-3, where I declared the custom editor (based on this PR) and added the telemetry plugin definition directly to the Devfile: https://github.com/dkwon17/che-code/compare/main...azatsarynnyy:che-code:telemetry-3?expand=1
After starting a DevWorkspace, I checked the logs in the telemetry plugin's container. There are expected messages:
2022-10-07 11:34:45,947 DEBUG [com.red.dev.ser.tel.woo.AnalyticsManager] (executor-thread-1) sending Refresh Workspace in Che (ip= - userAgent=) with properties: {creation time=1665140898000, devworkspace id=workspaceabe1e31c995344a6, devworkspace name=che-code, start time=1665140900999, age=
...
2022-10-07 11:35:47,083 DEBUG [com.red.dev.ser.tel.woo.AnalyticsManager] (executor-thread-1) sending Edit Workspace File in Che (ip= - userAgent=) with properties: {creation time=1665140898000, devworkspace id=workspaceabe1e31c995344a6, devworkspace name=che-code, start time=1665140900999, age=2, programming language=markdown}
Signed-off-by: dkwon17 <[email protected]>
Sorry, fixed
I was able to get your sample working by first converting it from v1alpha1 to a v1alpha2 DevWorkspace by running:
and then in
since I noticed they were empty strings in the v1alpha1 DevWorkspace. I'm not sure why they were empty in the first place, maybe there is a bug? I haven't seen this issue when working on this PR
Looks good, thank you for checking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good and it works as expected.
Thanks, @dkwon17!
Signed-off-by: David Kwon [email protected]
Part of eclipse-che/che#21661
This PR introduces a new built-in extension:
Which sends telemetry events to
http://localhost:${DEVWORKSPACE_TELEMETRY_BACKEND_PORT}
Compared to Che-theia telemetry, the Che-code telemetry:
git.push
andgit.commit
commands (like in che-theia) sinceonDidExecuteCommand
does not exist in the VS Code api: Finalize onDidExecuteCommand-API microsoft/vscode#78091 (comment). Therefore thePush to remote in Che
andCommit locally in Che
telemetry events are not being detected/sent.window
object is not availableTo test this PR:
spec.template.components
:This telemetry plugin will log the received events.
3. Start the workspace again
4. Run
yarn && yarn watch
and then runyarn server
to install dependencies and start up a new instance of VS Code.5. Click on
Open In New Tab
to open the new instance6. View the container logs for the telemetry plugin. You could try to send and verify that the
Start Workspace in Che
,Open Workspace in Che
, andEdit Workspace File in Che
events are being sent:Start Workspace in Che
log (when opening the workspace)Refresh Workspace in Che
log (you should see this when you refresh the page with F5 for example)Edit Workspace File in Che
log (when editing a file)There are more telemetry events, but the
Keep Workspace Inactive in Che
andStop Workspace in Che
events are handled form the plugin side and not the VS Code extension side (See 1, 2).