Skip to content
telemetry / 1.0.38

telemetry 1.0.38

Install from the command line:
Learn more about npm packages
$ npm install @harness/telemetry@1.0.38
Install via package.json:
"@harness/telemetry": "1.0.38"

About this version

This repo contains code used in the Harness CD Community Edition which is licensed under the PolyForm Shield License 1.0.0. This repo also contains code belonging to Harness CD Enterprise Plan which is licensed under the PolyForm Free Trial License 1.0.0. You may obtain a copy of these licenses in the licenses directory at the root of this repository.

Harness Telemetry

This package provides an abstraction for front end telemetry frameworks. Currently, this abstracts the Segment package. This allows consumers to avoid implementing and duplicating their own analytics methods and use a common package. In the future, if Segment is not used in favour of another analytics framework, it will be easy to change the contents of this abstraction rather than asking all consumers to change their code.

Documentation

Local Development

  1. Install the dependencies
$ yarn
  1. Add the package to your repo
yarn add file:./../harness-telemetry // The path to your repo
  1. Follow the steps in "Using this package"

Using this package

  1. Install the package in your repository
$ yarn add @harness/telemetry
  1. Initialize the Telemetry package at the entry point of your app and save it in a local file.
// your_app/src/Telemetry.ts
import Telemetry from '@harness/Telemetry'

const telemetry = new Telemetry(YOUR_WRITE_KEY)

export default telemetry;
  1. (OPTIONAL) Set the accountId.
// your_app/src/Telemetry.ts
import telemetry from './Telemetry'

telemetry.accountId = THE_ACCOUNT_ID
  1. Use the telemetry instance to call analytics methods.
import telemetry from './Telemetry'

telemetry.track("signup", { email })

Contributing

  1. Submit a PR and bump the version number in package.json

Details


Assets

  • telemetry-1.0.38-npm.tgz

Download activity

  • Total downloads 1
  • Last 30 days 0
  • Last week 0
  • Today 0