Skip to content

Log text of relevant file after an exception#27006

Merged
2 commits merged intomasterfrom
show_relevant_file
Sep 26, 2018
Merged

Log text of relevant file after an exception#27006
2 commits merged intomasterfrom
show_relevant_file

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Sep 10, 2018

Suggestion from #25790 (comment)

@sheetalkamat
Copy link
Copy Markdown
Member

Change looks good but we should confirm with @DanielRosenwasser to see if its it meets user's consent criteria to have text of the file. Not sure if vs uses this stack in some way either. adding @amcasey to see if its ok.

@amcasey
Copy link
Copy Markdown
Member

amcasey commented Sep 12, 2018

I don't believe there are GDPR concerns around logging customer content to a file that the customer controls. I'd be more concerned if we were including it in telemetry (which we're not, correct?).

When we request the log from customers, it's important to make sure they understand that their content will be included and to delete it promptly once the investigation is resolved.

@sheetalkamat
Copy link
Copy Markdown
Member

@amcasey do we not log these in some kind of dumps of failed requests? Like issues #20629 ?

@amcasey
Copy link
Copy Markdown
Member

amcasey commented Sep 12, 2018

@sheetalkamat We collect error messages (including stack traces). Is this modifying those? I thought it was just supplementing the log.

@sheetalkamat
Copy link
Copy Markdown
Member

It is adding text of the file to the error messages. Eg. if #20629 it will include stack trace + text of file if it was coming from some kind of file request. (completion in the file eg.)

@sheetalkamat
Copy link
Copy Markdown
Member

May be we should log the text only if LogLevel.verbose ?

@amcasey
Copy link
Copy Markdown
Member

amcasey commented Sep 13, 2018

@sheetalkamat I'm still missing something. It looks like only the error message in the log is modified - not the one sent in the message response.

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 13, 2018

@amcasey This PR doesn't modify err.stack, it just logs something in addition to that.

Note that tsserver.log contains info about every command that happened, so it basically already contains every keypress you made, as well as the contents of files open in the editor.

@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.2 milestone Sep 17, 2018
@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 17, 2018

@sheetalkamat @amcasey @DanielRosenwasser good to merge?

@amcasey
Copy link
Copy Markdown
Member

amcasey commented Sep 25, 2018

@Andy-MS My understanding matches yours - this change has no effect on telemetry. Unless @sheetalkamat still has concerns, I think this is fine from a GDPR perspective.

@ghost ghost merged commit c435d1c into master Sep 26, 2018
@ghost ghost deleted the show_relevant_file branch September 26, 2018 18:32
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
This pull request was closed.
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.

3 participants