Skip to content

opentracing/basictracer-javascript

Repository files navigation

basictracer-javascript NPM version build status Test coverage

The Javascript implementation of the BasicTracer reference implementation

Installation

npm install --save basictracer

Usage

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.

Data Model

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

Licensing

Apache 2.0 License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •