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 - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

24

build/spanDataSetter.js
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -24,17 +35,14 @@ var express_mung_1 = require("express-mung");

error: err,
headers: res.getHeaders()
headers: this.getHeaders(),
statusCode: this.statusCode
});
span.finish();
});
var responseSpanLog = {};
res.once('finish', function () {
span.log(__assign({}, responseSpanLog, { headers: this.getHeaders(), statusCode: this.statusCode }));
span.finish();
});
var responseInterceptor = function (body, req, res) {
span.log({
event: 'response',
status: 'normal',
statusCode: res.statusCode,
body: body,
headers: res.getHeaders(),
});
responseSpanLog = __assign({}, responseSpanLog, { event: 'response', status: 'normal', body: body });
return body;

@@ -41,0 +49,0 @@ };

{
"name": "jaeger-tracer",
"version": "1.0.10",
"version": "1.0.11",
"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",

@@ -23,3 +23,3 @@ import { Request, Response } from "express";

// listening to the error
res.once('error', (err) => {
res.once('error', function (this: Response, err: Error) {
span.log({

@@ -29,3 +29,4 @@ event: 'response',

error: err,
headers: res.getHeaders()
headers: this.getHeaders(),
statusCode: this.statusCode
});

@@ -35,4 +36,11 @@ span.finish();

res.once('finish', () => {
let responseSpanLog = {};
res.once('finish', function (this: Response) {
// just finishing the span in case the mung did not work
span.log({
...responseSpanLog,
headers: this.getHeaders(),
statusCode: this.statusCode
});
span.finish();

@@ -43,9 +51,8 @@ });

let responseInterceptor = (body: any, req: Request, res: Response) => {
span.log({
responseSpanLog = {
...responseSpanLog,
event: 'response',
status: 'normal',
statusCode: res.statusCode,
body,
headers: res.getHeaders(),
});
};

@@ -52,0 +59,0 @@ return body;

Sorry, the diff of this file is not supported yet

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