Change:
Whenever using notebooks for a non-trivial period of time I see this warning:
please give more system information and follow the template, else we cannot help.
can you share the log next time you see it, I updated the error message to give me better hints of what goes wrong.
Don't know if it's the exact same issue but I get this:
This (or same root cause messages) also happen when running integration tests
I am not really sure what's going wrong here but the fact that is a global which is used by instances seems fishy. I believe the usage of a global assumes is only opened in one editor at a time (which doesn't hold)
Steps open a notebook (no preview tab) split it in any split, open another notebook close it perf marker are broken https://user-
I was looking at refactoring this so the perf marks correspond to editors, not resources. Easiest thing to do would be to make the perf marks owned by NotebookEditorWidget. One is in NotebookEditor, it can be moved. The weird one is the one on the editor input Not sure how to handle this since an editor input doesn't know which editor it is being resolved for. Also you are logging one time for extensionActivation, then subsequent calls will log something short because the extension is already activated. Are we more concerned about the actual extension activation time or the typical time that this phase takes, whether or not the extension was already activated?
For the former there is also dedicated extension activation telemetry which should help with insights about this
Yeah, I feel like in this case we care about the typical time to open a notebook. I want to know what the typical experience is but that phase seems less interesting if it's mostly out of our control.
Still seeing this or see this again
<img width="2893" alt="Screenshot 2022-10-26 at 14 17 31" src="https://user-"
reproduces with these steps:
This fails when reopening the same notebook that was previously open in a NotebookEditorWidget. I think the fix is to ignore the customMarkdownLoaded mark here because that step didn't happen on this open. However this means that the telemetry event is now fired in a case where it was not previously fired. I could also add a new event besides to cover that case, if that event should only cover a fresh editor open. lmk if you are paying attention to this event

Discussion:
extensionActivated: number; inputLoaded: number; webviewCommLoaded: number; <del> customMarkdownLoaded: number; </del> <ins> customMarkdownLoaded: number | undefined; </ins> editorLoaded: number; };

startTime !== undefined && extensionActivated !== undefined && inputLoaded !== undefined <del> && customMarkdownLoaded !== undefined </del> && editorLoaded !== undefined ) { this.telemetryService.publicLog2<WorkbenchNotebookOpenEvent, WorkbenchNotebookOpenClassification>('notebook/editorOpenPerf', {

extensionActivated: extensionActivated - startTime, inputLoaded: inputLoaded - startTime, webviewCommLoaded: inputLoaded - startTime, <del> customMarkdownLoaded: customMarkdownLoaded - startTime, </del> <ins> customMarkdownLoaded: typeof customMarkdownLoaded === 'number' ? customMarkdownLoaded - startTime : undefined, </ins> editorLoaded: editorLoaded - startTime }); } else { <del> console.warn(`notebook file open perf marks are broken: startTime ${startTime}, extensionActiviated ${extensionActivated}, inputLoaded ${inputLoaded}, customMarkdownLoaded ${customMarkdownLoaded}, editorLoaded ${editorLoaded}`); </del> <ins> console.warn(`notebook file open perf marks are broken: startTime ${startTime}, extensionActivated ${extensionActivated}, inputLoaded ${inputLoaded}, customMarkdownLoaded ${customMarkdownLoaded}, editorLoaded ${editorLoaded}`); </ins> } } } catch (e) {