@salesforce/plugin-analytics

Command usage and error analytics for the Salesforce CLI

This package has been deprecated in favor of https://www.npmjs.com/package/@salesforce/plugin-telemetry
Last updated a year ago by jgrantham .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @salesforce/plugin-analytics 
SYNC missed versions from official npm registry.

@salesforce/plugin-analytics [DEPRECATED]

As of 1/25/2021 this package has been deprecated in favor of the new telemetry plugin. Please use that plugin instead.

Logs command execution and error information to app insights using @salesforce/telemetry. All logs are recorded to a local file in the CLI cache directory. Before the CLI process exists, a new process will be spawned up to read the local file and send logs to app insights. This saves ~1-3 seconds of time it can take to spin up and tear down the telemetry services.

During the CLI process, other plugins and CLI code also record custom events to the local file to be sent in the spawned process. To do so, simply instantiate the Analytics class.

const analytics = await Analytics.create({});
analytics.record({
  eventName: 'SOME_EVENT_NAME',
  ...
});

To not output the acknowledgement warning, set SFDX_TELEMETRY_DISABLE_ACKNOWLEDGEMENT to true.

export SFDX_TELEMETRY_DISABLE_ACKNOWLEDGEMENT=true

Development

To set up the project, just run yarn && yarn test.

To debug the project, it is helpful to link it in the CLI.

# In sfdx-plugin-analytics
yarn link

# In sfdx-cli
yarn link @salesforce/plugin-analytics
DEBUG=sfdx:analytics ./bin/run force

To debug the spawned process, set the telemetry in debug mode.

SFDX_TELEMETRY_DEBUG=true DEBUG=sfdx:analytics ./bin/run

Current Tags

  • 1.12.1                                ...           latest (a year ago)

19 Versions

  • 1.12.4 [deprecated]           ...           9 months ago
  • 1.12.3 [deprecated]           ...           9 months ago
  • 1.12.2 [deprecated]           ...           9 months ago
  • 1.12.1 [deprecated]           ...           a year ago
  • 1.12.0 [deprecated]           ...           a year ago
  • 1.11.0 [deprecated]           ...           a year ago
  • 1.10.0 [deprecated]           ...           a year ago
  • 1.9.1 [deprecated]           ...           a year ago
  • 1.9.0 [deprecated]           ...           a year ago
  • 1.8.0 [deprecated]           ...           2 years ago
  • 1.7.1 [deprecated]           ...           2 years ago
  • 1.7.0 [deprecated]           ...           2 years ago
  • 1.5.2 [deprecated]           ...           2 years ago
  • 1.4.1 [deprecated]           ...           2 years ago
  • 1.2.2 [deprecated]           ...           2 years ago
  • 1.2.1 [deprecated]           ...           2 years ago
  • 1.2.0 [deprecated]           ...           2 years ago
  • 1.1.2 [deprecated]           ...           3 years ago
  • 1.1.0 [deprecated]           ...           3 years ago

Copyright 2014 - 2021 © npmmirror.com |