Skip to content

The Javascript implementation of the BasicTracer referrence implementation

License

Notifications You must be signed in to change notification settings

open-trail/basictracer-javascript

Repository files navigation

basictracer-javascript NPM version build status Test coverage

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

About

The Javascript implementation of the BasicTracer referrence implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages