简体   繁体   中英

collecting data from vscode extension

I am new to vscode extension development. I have developed a vscode extension and havent published it. its for internal use and users would be using this extension from vsix file.

I now want to collect usage data like - how many people are using this extension, what version of the extension, what version of node they are using etc.

how can i do that? i have looked into vscode telemetry but looks like that mostly sending data to microsoft.

can the usage data be collected without publishing the plugin? if so, how? if not, can it be done if we publish? how?

The new Extension Telemetry API has been finalized in v1.75:

The new TelemetryLogger API has been finalized. This API aims to make utilizing telemetry easier for the author and safer for the end user. The API enables things such as built-in secret cleaning, a telemetry output channel, error handlers, and automatic telemetry level management. This allows for a more cohesive telemetry experience that is guaranteeed to follow our requirements.

from v1.73 Release Notes:

Extension Telemetry API

To further drive telemetry best practices and enhance the telemetry features extensions have offered to them, this iteration introduces the proposed telemetryLogger API. This API allows extension to supply a TelemetryAppender which acts as the core sending logic (implemented utilizing Application Insights or another data recording service). This TelemetryAppender is then used to instantiate a TelemetryLogger which is the class which you should log telemetry through. The TelemetryLogger provides a shared output channel to see sent telemetry events, proper telemetry setting checks, and personally identifiable information cleaning. Additionally any errors thrown by utilizing the VS Code API will be logged to your appender for better error diagnostics. A simple sample can be found here and feedback can be provided here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM