The Javascript implementation of the BasicTracer reference implementation
npm install --save basictracer
var tracer = require('basictracer')
tracer.configure({
sampler: mySampler,
recorder: myRecorder,
})
var span = tracer.startSpan('someOperation')
span.tag('key', 'value')
span.log({
event: 'read',
paylog: {duration: 1000},
})
span.finish()
See tests for more example.
type BasicSpan {
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