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

Transmit document telemetry in aggregate instead of on document open. #1131

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

rgrunber
Copy link
Contributor

@rgrunber rgrunber commented Nov 30, 2021

@rgrunber
Copy link
Contributor Author

rgrunber commented Dec 1, 2021

@angelozerr

@rgrunber
Copy link
Contributor Author

rgrunber commented Dec 3, 2021

Sample of the custom properties of a shutdown even from the client :

"properties": {
        "file.grammar.nonsschemalocation": 6,
        "file.grammar.doctype": 3,
        "file.extension.xml": 42,
        "file.resolver.embedded catalog.xsd": 2,
        "file.identifier.urn:oasis:names:tc:entity:xmlns:xml:catalog": 2,
        "file.extension.dtd": 11,
        "file.resolver.embedded xml.xsd": 11,
        "file.resolver.default": 24,
        "file.identifier.http://www.w3.org/2001/XMLSchema": 11,
        "file.identifier.http://www.springframework.org/schema/beans/spring-beans.xsd": 1,
        "file.grammar.xmlmodel": 5,
        "file.extension.xsd": 13,
        "file.identifier.http://www.springframework.org/schema/beans/spring-beans-3.0.xsd": 5,
        "file.grammar.none": 18,
        "file.identifier.http://maven.apache.org/xsd/maven-4.0.0.xsd": 2,
        "file.grammar.schemalocation": 10,
        "extension_name": "redhat.vscode-xml",
        "extension_version": "0.18.2",
        "app_name": "Visual Studio Code",
        "app_version": "1.62.3",
        "app_kind": "Desktop",
        "app_remote": false
    }

@@ -230,6 +230,7 @@ private synchronized void updateSettings(Object initOptions, boolean initLogs) {
if (capabilityManager.getClientCapabilities().getExtendedCapabilities().shouldLanguageServerExitOnShutdown()) {
delayer.schedule(() -> exit(0) , 1, TimeUnit.SECONDS);
}
getTelemetryManager().shutdown();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should happen in a separate thread that doesn't affect the shutdown process.

@angelozerr
Copy link
Contributor

LGTM

@angelozerr angelozerr merged commit fceb4c3 into eclipse-lemminx:master Dec 3, 2021
@angelozerr
Copy link
Contributor

Thanks @rgrunber !

@rgrunber rgrunber deleted the fix-620 branch December 3, 2021 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce Telemetry volume for server.document.open
2 participants