basictracer
v2.2.0
Published
The Javascript implementation of the BasicTracer referrence implementation
Downloads
97
Readme
basictracer-javascript
The Javascript implementation of the BasicTracer referrence implementation
Installation
npm install --save basictracer
Usage
var tracer = require('basictracer')
tracer.setRecorder(function record(span) {
log(span)
})
var span = tracer.startSpan('operationName')
span.tag('key', 'value')
span.log('read', {duration: 1000})
span.finish()
See tests for more example.
Data Model
type Span {
operationName: String
startTime: Number
duration: Number
tags: [Object]
logs: [Array]
traceId: Long
spanId: Long
parentId: String
sampled: Boolean
baggage: Object
}
Long
type represent by long.js
License
MIT