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

I can't use my own vscode.env.createTelemetryLogger to get error on version 0.8.0 #156

Closed
freedom-git opened this issue Jun 12, 2023 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@freedom-git
Copy link

I reported a question before:
link: #152

To solve this issue, version 0.8.0 add a line of code:

throw new Error("Attempted to send error data when the @vscode/extension-telemetry module does not support it.");

As this package also use vscode.env.createTelemetryLogger, it will cause that any error happend in extension will trigger the above line, it will throw an error, and my own vscode.env.createTelemetryLogger listener will not even run.

@lramos15
Copy link
Member

Ah so you think we shouldn't throw and instead should just drop the error

@lramos15 lramos15 self-assigned this Jun 12, 2023
@lramos15 lramos15 added the bug Issue identified by VS Code Team member as probable bug label Jun 12, 2023
@freedom-git
Copy link
Author

Yeah, actually I don't think it is an error. Because I haven't call reporter.sendTelemetryErrorEvent or reporter.sendTelemetryException. I just import TelemetryReporter from '@vscode/extension-telemetry', and it start to throw error and make my own listener of vscode.env.createTelemetryLogger not working.

@lramos15
Copy link
Member

Well this is being triggered by the automatic error catching which the telemetry API does. So if your code throws some sort of error I assume we would call the sendTelemetryErrorEvent and then fail and throw an error causing a loop. Is that what is happening here?

@lramos15
Copy link
Member

lramos15 commented Jul 5, 2023

Fixed by #158

@lramos15 lramos15 closed this as completed Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants