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 output channel for telemetry.log file #58846

Merged
merged 3 commits into from
Sep 20, 2018
Merged

Conversation

ramya-rao-a
Copy link
Contributor

@ramya-rao-a ramya-rao-a commented Sep 17, 2018

This PR adds a output channel for the telemetry.log file and addresses the issue #58536

@sandy081 When opening with --verbose flag, the telemetry events get logged to the telemetry.log file right from the start. But the output channel remains blank until I close it and open it again. Any ideas why so?

Note: To test this locally,

@ramya-rao-a ramya-rao-a self-assigned this Sep 18, 2018
@sandy081
Copy link
Member

sandy081 commented Sep 19, 2018

When opening with --verbose flag, the telemetry events get logged to the telemetry.log file right from the start. But the output channel remains blank until I close it and open it again. Any ideas why so?

Its because during the time you register the channel, file does not yet exist. You have to create the channel after the file exists. May I know where do you create the telemetry log file?

Also why not we create the channel always even if it is empty. I think its fine to have empty channels when nothing is written into it.

@ramya-rao-a
Copy link
Contributor Author

ramya-rao-a commented Sep 19, 2018

You have to create the channel after the file exists. May I know where do you create the telemetry log file?

The log file is created in the shared process

Also why not we create the channel always even if it is empty. I think its fine to have empty channels when nothing is written into it.

For other log channels, yes it is fine do to so because as the user interacts with VS Code, they will get data. But the telemetry channel will only ever get data when the log level is changed to trace. Until, then it is an unnecessary distraction. Users who see something called "Log (Telemetry)" will expect to see something there. They might be mislead to believe that we dont send any telemetry at all after seeing the empty channel

@ramya-rao-a
Copy link
Contributor Author

I think this a generic issue and not just for the telemetry channel.

  • Open the Log (Shared) channel
  • Close VS Code, Open VS Code
  • The Log (Shared) channel will be open, but empty and will remain empty until we change the channel

Changing channel does not re-create the channel. So I am unsure of the theory that the channel is empty because nothing is written to the log file before its creation.

@sandy081
Copy link
Member

I think this a generic issue and not just for the telemetry channel.

Yes, that's true and I fixed it.

They might be mislead to believe that we dont send any telemetry at all after seeing the empty channel

Was not it true even before, when there is a command to open telemetry log file?

@ramya-rao-a
Copy link
Contributor Author

Was not it true even before, when there is a command to open telemetry log file?

Yes, but you had to go looking for the command vs now when the Log (Telemetry) is opened and showed to the user by default when opening with code --verbose.

But regardless, I'll push one line to the telemetry.log file as soon as it is created to say something to the affect of "This file logs all the telemetry from VS Code when the log level is set to trace"

@ramya-rao-a ramya-rao-a merged commit c0d1f91 into master Sep 20, 2018
@ramya-rao-a ramya-rao-a deleted the ramyar/telemetryLog branch September 20, 2018 17:39
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
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