提交 7a463eaf 编写于 作者: X Xin,Zhang 提交者: wu-sheng

Change dependencies: end-of-stream => on-finished (#17)

上级 37ca384f
......@@ -16,7 +16,7 @@
*/
"use strict";
const endOfStream = require("end-of-stream");
const onFinished = require("on-finished");
const ContextCarrier = require("../../trace/context-carrier");
const layerDefine = require("../../trace/span-layer");
const componentDefine = require("../../trace/component-define");
......@@ -55,7 +55,7 @@ module.exports = function(httpModule, instrumentation, contextManager) {
let span = contextManager.createEntrySpan(req.url, contextCarrier);
span.component(componentDefine.Components.HTTP);
span.spanLayer(layerDefine.Layers.HTTP);
endOfStream(res, function(err) {
onFinished(res, function(err) {
if (err) {
span.errorOccurred();
span.log(err);
......
......@@ -34,9 +34,9 @@
"dependencies": {
"async": "^2.6.0",
"debug": "^3.1.0",
"end-of-stream": "^1.4.1",
"google-protobuf": "^3.5.0",
"grpc": "^1.10.1",
"on-finished": "^2.3.0",
"uuid": "^3.2.1"
},
"devDependencies": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册