-
Notifications
You must be signed in to change notification settings - Fork 93
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 event when opening a file #1066
Comments
Entry point would probably be https://github.com/eclipse/lemminx/blob/master/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/XMLTextDocumentService.java#L531 . From there, one can access the DOMDocument of the document being opened. It already has helper methods. Would probably need to create a separate (but similar) method since triggerValidation is called for both didOpen & didChange. |
@mauri-sfdc why are you confused? As @fbricon said, our goal is to give us some guidance on priorities. For instance if we see that :
The telemetry will give us those relevant informations. |
To know the referenced grammars, we should get list of ReferencedGrammarInfo from the opened, closed, etc DOM document. Set<ReferencedGrammarInfo> referencedGrammarInfos = contentModelManager.getReferencedGrammarInfos(document); You can see content of list of ReferencedGrammarInfo in Outline. With list of ReferencedGrammarInfo you will know the list of bound XSD, DTD and for each binding you will know the binding type (catalog, files associations, xsi, doctype, etc) I think binding type is a relevant information too. As ReferencedGrammarInfo belongs to the contentmodel extension (and not the core), the telemetry which will use ReferencedGrammarInfo must be done in the contentmodel extension. To track didOpen, didClose, etc in an extension, you can do that with a lifecycle document participant. I created a PR for that in (once #1091 Once this PR will be merged, this issue could be done. |
- Resolves eclipse-lemminx#1066 - Report file extensions for didOpen & didClose Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- Resolves eclipse-lemminx#1066 - Report file extensions for didOpen Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- Resolves eclipse-lemminx#1066 - Report file extensions, grammar type, identifier URI, and resolver used for didOpen Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
- Resolves eclipse-lemminx#1066 - Report file extensions, grammar type, and resolver used for didOpen Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
When a file is opened, a telemetry event should be sent with
* none/xsd/dtd
* local/remote
* schema/grammar URL, if remote
we should be able to understand the popular content. If some schemas are used often that would give us some guidance on priorities.
The text was updated successfully, but these errors were encountered: