vscode-extension-telemetry

  • 所有者: microsoft/vscode-extension-telemetry
  • 平台:
  • 许可证: Other
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

vscode-extension-telemetry

This module provides a consistent way for first-party extensions to report telemetry
over Application Insights. The module respects the user's decision about whether or
not to send telemetry data.

Follow guide to set up Application Insights in Azure and get your key.

install

npm install vscode-extension-telemetry

usage

const vscode = require('vscode');
const TelemetryReporter = require('vscode-extension-telemetry');

// all events will be prefixed with this event name
const extensionId = '<your extension unique name>';

// extension version will be reported as a property with each event 
const extensionVersion = '<your extension version>'; 

// the application insights key (also known as instrumentation key)
const key = '<your key>'; 

// telemetry reporter 
let reporter;

function activate(context: vscode.ExtensionContext) {
   ...
   // create telemetry reporter on extension activation
   reporter = new TelemetryReporter(extensionId, extensionVersion, key);
   // ensure it gets property disposed
   context.subscriptions.push(reporter);
   ...
}

function deactivate() {
  // This will ensure all pending events get flushed
   reporter.dispose();
}

...
// send event any time after activation
reporter.sendTelemetryEvent('sampleEvent', { 'stringProp': 'some string' }, { 'numericMeasure': 123});

common properties

  • common.extname
  • common.extversion
  • common.vscodemachineid
  • common.vscodesessionid
  • common.vscodeversion
  • common.os
  • common.platformversion

License

MIT

主要指标

概览
名称与所有者microsoft/vscode-extension-telemetry
主编程语言TypeScript
编程语言TypeScript (语言数: 2)
平台
许可证Other
所有者活动
创建于2016-02-05 23:47:17
推送于2025-03-18 17:17:55
最后一次提交
发布数44
最新版本名称v0.9.8 (发布于 )
第一版名称0.3 (发布于 )
用户参与
星数133
关注者数32
派生数53
提交数394
已启用问题?
问题数105
打开的问题数8
拉请求数98
打开的拉请求数0
关闭的拉请求数13
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?