Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jaeger-tracer

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jaeger-tracer

client library for jaegar to ease out the instrumenting in express and any other backend application based on express in nodejs

  • 1.1.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Jaeger-tracer

This is a module for jaeger instrumentation to allow your node backend with just four lines of code and the require statements included to be able to send the incoming and outgoing requests and responses data to the jaeger backend.

npm version Dependency Status

Table of contents

Installation

npm install jaeger-tracer

Usage

All you need to do is include the following middleware in your app with the following way

let { jaegarTracerMiddleware } = require('jaeger-tracer');
let http = require('http');
let https = require('https');


// some middlewares
// body parser middleware

// jaeger tracer middleware here
app.use(jaegarTracerMiddleware({ http, https }, '<app name here>', {
	reporter: {
	    // host name of your 
		agentHost:  'jaegar'
	}
}
));

This is the simplest usage of package you can customize the collector host and many other data through the configs which we will be describing later.


How the package works

Inside the package we just log the incoming requests and their responses from this backend the middleware takes the http or https to be able to monkey patch the http.request or https.request functions and put the tracer headers in any outgoing requests to third party backends. Also the it extracts the headers from any incoming requests to relate spans with the parent child relations. basically everything from extracting and injecting the headers happens inside.

Important notes

The package inside use the continuation-local-storage so , be careful to lose the context also there is a function which gets you the context to be able to pass it over if its lost in some place in your code.

API Reference

The package exports the following functions to give you full control and flexibility below we will list the function telling what is the usage of each one and what do they do.

jaegarTracerMiddleware
initTracer
makeSpan
makeSpanWithParent
spanMaker
getContext
unirestWrapper
requestWrapper
getInjectionHeaders

Keywords

FAQs

Package last updated on 13 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc