@opencensus/instrumentation-http2
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -50,3 +50,3 @@ "use strict"; | ||
const client = original.apply(this, arguments); | ||
shimmer.wrap(client, 'request', (original) => (plugin.getPatchRequestFunction())(original, authority)); | ||
shimmer.wrap(client, 'request', original => plugin.getPatchRequestFunction()(original, authority)); | ||
shimmer.unwrap(plugin.moduleExports, 'connect'); | ||
@@ -79,4 +79,7 @@ return client; | ||
else { | ||
const span = plugin.tracer.startChildSpan({ name: traceOptions.name, kind: traceOptions.kind }); | ||
return (plugin.getMakeHttp2RequestTraceFunction(request, headers, authority, plugin))(span); | ||
const span = plugin.tracer.startChildSpan({ | ||
name: traceOptions.name, | ||
kind: traceOptions.kind, | ||
}); | ||
return plugin.getMakeHttp2RequestTraceFunction(request, headers, authority, plugin)(span); | ||
} | ||
@@ -93,3 +96,3 @@ }; | ||
headers[name] = value; | ||
} | ||
}, | ||
}; | ||
@@ -151,3 +154,3 @@ const propagation = plugin.tracer.propagation; | ||
return headers[name]; | ||
} | ||
}, | ||
}; | ||
@@ -183,3 +186,4 @@ const traceOptions = { | ||
const returned = stream.end.apply(this, arguments); | ||
const userAgent = (headers['user-agent'] || headers['User-Agent'] || | ||
const userAgent = (headers['user-agent'] || | ||
headers['User-Agent'] || | ||
null); | ||
@@ -186,0 +190,0 @@ rootSpan.addAttribute(Http2Plugin.ATTRIBUTE_HTTP_HOST, `${headers[':authority']}`); |
{ | ||
"name": "@opencensus/instrumentation-http2", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"description": "Opencensus http2 automatic instrumentation package.", | ||
@@ -56,4 +56,4 @@ "main": "build/src/index.js", | ||
"@types/shimmer": "^1.0.1", | ||
"codecov": "^3.4.0", | ||
"gts": "^0.9.0", | ||
"codecov": "^3.5.0", | ||
"gts": "^1.0.0", | ||
"mocha": "^6.1.0", | ||
@@ -67,4 +67,4 @@ "nyc": "^14.0.0", | ||
"dependencies": { | ||
"@opencensus/core": "^0.0.14", | ||
"@opencensus/instrumentation-http": "^0.0.14", | ||
"@opencensus/core": "^0.0.15", | ||
"@opencensus/instrumentation-http": "^0.0.15", | ||
"semver": "^6.0.0", | ||
@@ -71,0 +71,0 @@ "shimmer": "^1.2.0" |
26525
280
+ Added@opencensus/core@0.0.15(transitive)
+ Added@opencensus/instrumentation-http@0.0.15(transitive)
- Removed@opencensus/core@0.0.14(transitive)
- Removed@opencensus/instrumentation-http@0.0.14(transitive)
Updated@opencensus/core@^0.0.15