@zaplabs/opencensus-nodejs-base
TypeScript icon, indicating that this package has built-in type declarations

0.0.14 • Public • Published

OpenCensus for Node.js Base

Gitter chat

OpenCensus Node.js Base is an implementation of OpenCensus, a toolkit for collecting application performance and behavior monitoring data.

The library is in alpha stage and the API is subject to change.

Please join gitter for help or feedback on this project.

Installation

Install OpenCensus Base with:

npm install @opencensus/nodejs-base

Traces

Automatically Instrumenting an Application

For automatic insturmentation see the @opencensus/nodejs package.

Manually Instrumenting an Application

With @opencensus/nodejs-base you have a full control over instrumentation and span creation. The base package doesn't load Continuation Local Storage (CLS) or any instrumentation plugin by default.

const rootSpanOptions = { name: 'your root span' };
tracing.tracer.startRootSpan(rootSpanOptions, (rootSpan) => {

    // You can create as many child spans as needed
    childSpan = tracing.tracer.startChildSpan({
        name: 'name of your child span'
    });
    // Do some operation...
    // Finish the child span at the end of it's operation
    childSpan.end();

    // Finish the root span at the end of the operation
    rootSpan.end();
});

Tracing Options

See the @opencensus/nodejs package for the full API documentation.

Useful links

Package Sidebar

Install

npm i @zaplabs/opencensus-nodejs-base

Weekly Downloads

1

Version

0.0.14

License

Apache-2.0

Unpacked Size

37 kB

Total Files

13

Last publish

Collaborators

  • danbalagan
  • shubhank.mehta
  • nikita3
  • ameenaazad
  • chandu_m
  • ugawai
  • vsugguna
  • abhirai
  • gkannan
  • priyanka.shirke
  • bhoye
  • rubavahini
  • sgarlapati
  • chad.spangler
  • atannu
  • arodina
  • smakys501
  • ashajayanna
  • kashif.ali.zaplabs
  • r.pathak
  • guillermo.alonso
  • sphan
  • shawnzap
  • networkoperations-zaplabs
  • mdj.moreno
  • mrunalk
  • aseem.gupta
  • indrajitb
  • daniel.torres
  • sanket_g
  • neerajamuthu
  • shruthisubu
  • cmariyappan
  • kravichandran
  • ibazil
  • bvharikk
  • ckarthik
  • rudrananda
  • sgnanaguru
  • dashokan
  • dthangam
  • hanushika
  • arpitapradhan
  • mbalandra
  • priyagottipati
  • roshani.jaiswal
  • rkailasam
  • gowreson
  • divyambika19
  • priyankaraj
  • seetabhavana
  • pvedhapuri
  • boomiraj
  • siva9
  • aman1991