0.0.5 âĸ Published 1 year ago
@graphshieldhq/telemetry v0.0.5
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'
}
})