jaeger-tracer
Advanced tools
Comparing version 1.0.23 to 1.0.24
@@ -10,3 +10,5 @@ "use strict"; | ||
exports.saveToCls(constants_1.constants.mainSpan, mainSpan); | ||
interceptorMiddleware(req, res, next); | ||
session.run(function () { | ||
interceptorMiddleware(req, res, next); | ||
}); | ||
}); | ||
@@ -13,0 +15,0 @@ exports.saveToCls = session.bind(function (key, value) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var ClsManager_1 = require("./ClsManager"); | ||
var constants_1 = require("./constants"); | ||
var FORMAT_HTTP_HEADERS = require('opentracing').FORMAT_HTTP_HEADERS; | ||
var continuation_local_storage_1 = require("continuation-local-storage"); | ||
var session = continuation_local_storage_1.getNamespace(constants_1.constants.clsNamespace); | ||
exports.unirestWrapper = function (unirest) { | ||
@@ -27,4 +28,4 @@ if (!unirest.request) | ||
var getInjectHeaders = function () { | ||
var tracer = ClsManager_1.getFromCls(constants_1.constants.tracer); | ||
var span = ClsManager_1.getFromCls(constants_1.constants.mainSpan); | ||
var tracer = session.get(constants_1.constants.mainSpan); | ||
var span = session.get(constants_1.constants.mainSpan); | ||
var headers = {}; | ||
@@ -31,0 +32,0 @@ tracer.inject(span, FORMAT_HTTP_HEADERS, headers); |
{ | ||
"name": "jaeger-tracer", | ||
"version": "1.0.23", | ||
"version": "1.0.24", | ||
"description": "client library for jaegar to ease out the instrumenting in express and any other backend application based on express in nodejs", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -25,3 +25,5 @@ import { createNamespace, Namespace, getNamespace } from 'cls-hooked'; | ||
// this middleware should call next inside it automatically | ||
interceptorMiddleware(req, res, next); | ||
session.run(() => { | ||
interceptorMiddleware(req, res, next); | ||
}); | ||
}); | ||
@@ -28,0 +30,0 @@ |
@@ -6,4 +6,5 @@ import { getFromCls } from "./ClsManager"; | ||
const { FORMAT_HTTP_HEADERS } = require('opentracing'); | ||
import { getNamespace } from 'continuation-local-storage'; | ||
let session = getNamespace(constants.clsNamespace); | ||
/** | ||
@@ -63,5 +64,8 @@ * @description this is a function which will be used to inject headers in | ||
// getting the main span from the cls | ||
let tracer: any = getFromCls(constants.tracer); | ||
let span: any = getFromCls(constants.mainSpan); | ||
// let tracer: any = getFromCls(constants.tracer); | ||
// let span: any = getFromCls(constants.mainSpan); | ||
let tracer = session.get(constants.mainSpan); | ||
let span = session.get(constants.mainSpan); | ||
let headers = {}; | ||
@@ -68,0 +72,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69573
987