Skip to content

hawkular/hawkular-apm-opentracing-javascript

Repository files navigation

Hawkular-APM OpenTracing JavaScript Implementation

Travis Jira Issues Join the chat at freenode:hawkular

NPM

This library is JavaScript implementation of OpenTracing API. It is intended to be used with Hawkular-APM server.

Install

$ npm install --save hawkular-apm-opentracing

Usage

const opentracing = require('opentracing');
const hawkularAPM = require('hawkular-apm-opentracing');

const tracer = new hawkularAPM.APMTracer({
    recorder: new hawkularAPM.ConsoleRecorder(),
    sampler: new hawkularAPM.AlwaysSample(),
    deploymentMetaData: new hawkularAPM.DeploymentMetaData('serviceName'),
});

opentracing.initGlobalTracer(tracer);

const span = opentracing.globalTracer().startSpan('name');
span.finish();

Develop

$ make test
$ make publish VERSION=(patch|minor|major)