0.0.5 â€ĸ Published 1 year ago

@graphshieldhq/telemetry v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Versioning Twitter Follow

Telemetry Module

An opinionated telemetry module.

💡 Features

🚀 Get Started

Installation

npm install --save @graphshieldhq/telemetry

Initialization

import telemetry from '@graphshieldhq/telemetry'
telemetry.init({
  instrumentation_key: '',
  live_metrics: false,
  role: 'Service A',
  context: {
    deploy: 'development',
    version: '1.0.0'
  },
  logging: console.debug
})

The initialization options must be an object with properties as specified in the options schema.

Usage

Once initialized, this module will automatically collect all the logs from stdout.

In addition, you can track specific events:

telemetryTracker({
  event_key: 'something_happened',
  event_payload: {
    where: 'here',
    who: 'me'
  }
})

Additional resources