@salesforce/plugin-telemetry

3.1.17 • Public • Published

plugin-telemetry

NPM Downloads/week License

A plugin to record command usage and error telemetry for the Salesforce CLI.

This plugin is bundled with the CLI and will automatically collect usage data on all commands and plugins. To disable data collection, see this help document.

Note: This plugin should be included at a CLI level ONLY. No CLI plugins should include or depend on this plugin.

All command usage is recorded by initializing on the init oclif hook, recording all events to a log file, then spawning a process on exit to send the data to appinsights.

To debug the telemetry spawned process, run a command with the environment variables SF_TELEMETRY_DEBUG=true and DEBUG=sf:telemetry.

SF_TELEMETRY_DEBUG=true DEBUG=sf:telemetry* ./bin/dev telemetry

Getting Started

To build the plugin locally, make sure to have yarn installed and run the following commands:

# Clone the repository
git clone git@github.com:salesforcecli/plugin-telemetry

# Install the dependencies and compile
yarn install
yarn build

To use your plugin, run using the local ./bin/dev or ./bin/dev.cmd file.

# Run using local run file.
./bin/dev telemetry

There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.

# Link your plugin to the sfdx cli
sf plugins:link .
# To verify
sf plugins

Dependents (3)

Package Sidebar

Install

npm i @salesforce/plugin-telemetry

Weekly Downloads

142,469

Version

3.1.17

License

BSD-3-Clause

Unpacked Size

1.08 MB

Total Files

34

Last publish

Collaborators

  • dme722
  • nolanlawson
  • ire-npm-team-user
  • jburnie
  • abirchfieldsfdc
  • dlouvton
  • mobify
  • jmsjtu
  • jasonschroeder-sfdc
  • packagellama
  • maward
  • danielshox
  • duane.chew
  • dferro
  • jcourtner
  • jye-sf
  • adirasanam
  • hkii
  • iamaziz
  • dbreese-salesforce
  • ashokrudraraju
  • dhersam
  • demianbrecht
  • mbettio
  • damilareolowoniyi
  • mmadialagan
  • mjrust
  • salesforce-releases
  • mpsenn
  • kevinv11n
  • byao
  • pmdartus
  • ekashida
  • gr8gatsby
  • ravi.jayaramappa
  • apapko
  • jleen-sfdc
  • jqian
  • cwallsf
  • dhagberg-sf
  • khawkins
  • amphro
  • jodarove
  • sfdctaka
  • fernomac
  • jimjag
  • ivarley
  • jbartolotta-sfdc