All Projects → microsoft → vscode-extension-telemetry

microsoft / vscode-extension-telemetry

Licence: other
Node module to help VS Code extensions send telemetry using application insights

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vscode-extension-telemetry

Windowsspyblocker
WindowsSpyBlocker 🛡️ is an application written in Go and delivered as a single executable to block spying and tracking on Windows systems.
Stars: ✭ 2,913 (+3173.03%)
Mutual labels:  telemetry
probe-scraper
Scrape and publish Telemetry probe data from Firefox
Stars: ✭ 18 (-79.78%)
Mutual labels:  telemetry
ApplicationInsights-Ruby
Microsoft Application Insights SDK for Ruby
Stars: ✭ 30 (-66.29%)
Mutual labels:  telemetry
Nvidia Modded Inf
Modified nVidia .inf files to run drivers on all video cards, research & telemetry free drivers
Stars: ✭ 227 (+155.06%)
Mutual labels:  telemetry
F1-demo
Real-time vehicle telematics analytics demo using OmniSci
Stars: ✭ 27 (-69.66%)
Mutual labels:  telemetry
ESP32
DroneBridge for ESP32. A short range wifi based telemetry link. Support for MAVLink, MSP & LTM (iNAV).
Stars: ✭ 183 (+105.62%)
Mutual labels:  telemetry
Gopro Utils
Tools to parse metadata from GoPro Hero 5 & 6 cameras
Stars: ✭ 191 (+114.61%)
Mutual labels:  telemetry
stanza
Fast and lightweight log transport and processing.
Stars: ✭ 142 (+59.55%)
Mutual labels:  telemetry
ets2-mobile-route-advisor
ETS2 / ATS's Route Advisor, for mobile devices
Stars: ✭ 119 (+33.71%)
Mutual labels:  telemetry
Coderr.Client
Core client library for Coderr
Stars: ✭ 23 (-74.16%)
Mutual labels:  telemetry
Wifibroadcast
Transmitter and receiver of UDP packets using raw WiFi radio
Stars: ✭ 247 (+177.53%)
Mutual labels:  telemetry
f1-telemetry-client
A Node UDP client and telemetry parser for Codemaster's Formula 1 series of games
Stars: ✭ 128 (+43.82%)
Mutual labels:  telemetry
cpp client telemetry
1DS C++ SDK
Stars: ✭ 62 (-30.34%)
Mutual labels:  telemetry
Applicationinsights Home
Application Insights main repository for documentation of overall SDK offerings for all platforms.
Stars: ✭ 221 (+148.31%)
Mutual labels:  telemetry
appinsights-rs
Application Insights SDK for Rust
Stars: ✭ 29 (-67.42%)
Mutual labels:  telemetry
Luatelemetry
FrSky SmartPort(S.Port), D-series, F.Port and TBS Crossfire telemetry on all Taranis and Horus transmitters
Stars: ✭ 206 (+131.46%)
Mutual labels:  telemetry
browser-telemetry
A Telemetry module for collecting errors, logs, metrics, uncaught exceptions etc on browser side.
Stars: ✭ 20 (-77.53%)
Mutual labels:  telemetry
taar
Telemetry-Aware Addon Recommender
Stars: ✭ 23 (-74.16%)
Mutual labels:  telemetry
Oculess
Removes account requirements and telemetry from Oculus Quest devices
Stars: ✭ 1,551 (+1642.7%)
Mutual labels:  telemetry
orb
Orb is a dynamic network observability platform
Stars: ✭ 437 (+391.01%)
Mutual labels:  telemetry

@vscode/extension-telemetry

This module provides a consistent way for extensions to report telemetry over Application Insights. The module respects the user's decision about whether or not to send telemetry data. See telemetry extension guidelines for more information on using telemetry in your extension.

Follow guide to set up Application Insights in Azure and get your key. Don't worry about hardcoding it, it is not sensitive.

Install

With npm: npm install @vscode/extension-telemetry With yarn: yarn add @vscode/extension-telemetry

Usage

Setup

import * as vscode from 'vscode';
import TelemetryReporter from '@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 properly disposed. Upon disposal the events will be flushed
   context.subscriptions.push(reporter);
}

First-Party

By default, we use the AppInsights key to detect whether or not the telemetry is first-party. The constructor now takes an optional parameter that will force the reporter to treat telemetry as first-party. This parameter will not override in the false direction.

Sending Events

Use this method for sending general events to App Insights.

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

Sending Exceptions

Use this method for diagnostics in App Insights. This method will automatically drop events in certain environments for first party extensions.

// send an error any time after activation
try { ... } catch (error) {
   reporter.sendTelemetryException(error, { 'stringProp': 'some string' }, { 'numericMeasure': 123 });
}

Sending Errors as Events

Use this method for sending error telemetry as traditional events to App Insights. This method will automatically drop error properties in certain environments for first party extensions. The last parameter is an optional list of case-sensitive properties that should be dropped. If no array is passed, we will drop all properties but still send the event.

// send an error event any time after activation
reporter.sendTelemetryErrorEvent('sampleErrorEvent', { 'stringProp': 'some string', 'stackProp': 'some user stack trace' }, { 'numericMeasure': 123 }, [ 'stackProp' ]);

Common Properties

  • Extension Name common.extname - The extension name
  • Extension Version common.extversion - The extension version
  • Machine Identifier common.vscodemachineid - A common machine identifier generated by VS Code
  • Session Identifier common.vscodesessionid - A session identifier generated by VS Code
  • VS Code Version common.vscodeversion - The version of VS Code running the extension
  • OS common.os - The OS running VS Code
  • Platform Version common.platformversion - The version of the OS/Platform
  • Product common.product - What Vs code is hosted in, i.e. desktop, github.dev, codespaces.
  • UI Kind common.uikind - Web or Desktop indicating where VS Code is running
  • Remote Name common.remotename - A name to identify the type of remote connection. other indicates a remote connection not from the 3 main extensions (ssh, docker, wsl).
  • Architecture common.nodeArch - What architecture of node is running. i.e. arm or x86. On the web it will just say web.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].