Medium/lightstep-tracer-javascript

Name: lightstep-tracer-javascript

Owner: Medium

Description: null

Forked from: lightstep/lightstep-tracer-javascript

Created: 2016-07-25 19:11:28.0

Updated: 2016-07-25 19:11:29.0

Pushed: 2017-02-20 21:33:45.0

Homepage: null

Size: 529

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

lightstep-tracer

npm version Circle CI MIT license

LightStep distributed tracing library for Node.js and the browser.

Installation
install --save lightstep-tracer opentracing

All modern browsers and Node versions >= 0.12 are supported.

Getting started

To use LightStep as the OpenTracing binding, initialize the global Tracer with the LightStep implementation:

opentracing = require('opentracing');
lightstep   = require('lightstep-tracer');

tracing.initGlobalTracer(new lightstep.Tracer({
access_token   : '{your_access_token}',
component_name : '{your_service_or_app_name}',

The LightStep JavaScript Tracing Cookbook is a good next stop for information on how to quickly instrument your system. If you want to try something out quickly in your browser code, see the browser quick start example.

The browser version of the code can be explicitly included using the following, which can be helpful in some browserify (or similar) setups:

lightstep = require('lightstep-tracer/browser');
LightStep-specific API

The OpenTracing standard JavaScript API is documented here. The following describes LightStep-specific options and methods.

LightStep

new Tracer(options)

Required options

Standard options

Browser-specific initialization options

Non-standard options

NOTE: Future API compatibility on non-standard options is not guaranteed.

SpanImp

generateTraceURL()

Returns an absolute URL to the LightStep application for the trace containing this span. It is safe to call this method after finish().


.finish();

url = span.generateTraceURL())
ole.log('View the trace for this span at:', url);
License

The MIT License.

Copyright (c) 2016, LightStep


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.