jaeger-tracer
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -35,4 +35,4 @@ "use strict"; | ||
error: err, | ||
headers: this.getHeaders(), | ||
statusCode: this.statusCode | ||
headers: this.getHeaders ? this.getHeaders() : this.headers || {}, | ||
statusCode: this.statusCode || 'no status found' | ||
}); | ||
@@ -45,3 +45,3 @@ span.finish(); | ||
res.once('finish', function () { | ||
span.log(__assign({}, responseSpanLog, { headers: this.getHeaders(), statusCode: this.statusCode, statusMessage: this.statusMessage })); | ||
span.log(__assign({}, responseSpanLog, { headers: this.getHeaders ? this.getHeaders() : this.headers || {}, statusCode: this.statusCode || 'no status found', statusMessage: this.statusMessage || 'no message found' })); | ||
span.finish(); | ||
@@ -48,0 +48,0 @@ }); |
{ | ||
"name": "jaeger-tracer", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"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', function (this: Response, err: Error) { | ||
res.once('error', function (this: Response | any, err: Error) { | ||
span.log({ | ||
@@ -29,4 +29,4 @@ event: 'response', | ||
error: err, | ||
headers: this.getHeaders(), | ||
statusCode: this.statusCode | ||
headers: this.getHeaders ? this.getHeaders() : this.headers || {}, | ||
statusCode: this.statusCode || 'no status found' | ||
}); | ||
@@ -40,9 +40,9 @@ span.finish(); | ||
res.once('finish', function (this: Response) { | ||
res.once('finish', function (this: Response | any) { | ||
// just finishing the span in case the mung did not work | ||
span.log({ | ||
...responseSpanLog, | ||
headers: this.getHeaders(), | ||
statusCode: this.statusCode, | ||
statusMessage: this.statusMessage | ||
headers: this.getHeaders ? this.getHeaders() : this.headers || {}, | ||
statusCode: this.statusCode || 'no status found', | ||
statusMessage: this.statusMessage || 'no message found' | ||
}); | ||
@@ -49,0 +49,0 @@ span.finish(); |
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
72591