Skip to content

Commit 5eefc0c

Browse files
chore: corrected the refactoring
1 parent 1cbcc28 commit 5eefc0c

6 files changed

Lines changed: 2 additions & 20 deletions

File tree

packages/core/src/tracing/instrumentation/cloud/aws-sdk/v3/sqs-consumer.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ function instrument(SQSConsumer) {
3636
span.d = Date.now() - span.ts;
3737
span.transmitManual();
3838
});
39-
} else {
40-
span.d = Date.now() - span.ts;
41-
span.transmitManual();
4239
}
4340

4441
return res;
@@ -73,9 +70,6 @@ function instrument(SQSConsumer) {
7370
span.d = Date.now() - span.ts;
7471
span.transmitManual();
7572
});
76-
} else {
77-
span.d = Date.now() - span.ts;
78-
span.transmitManual();
7973
}
8074

8175
return res;

packages/core/src/tracing/instrumentation/databases/mysql.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ function shimPromiseConnection(original) {
250250
return connection;
251251
});
252252
}
253-
return promise;
254253
};
255254
}
256255

packages/core/src/tracing/instrumentation/frameworks/koa.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,10 @@ function instrumentedRoutes(thisContext, originalRoutes, originalArgs) {
7272
return resolvedValue;
7373
});
7474
}
75-
return dispatchResult;
75+
} else {
76+
return dispatch.apply(this, arguments);
7677
}
77-
return dispatch.apply(this, arguments);
7878
};
79-
8079
// The router attaches itself as a property to the dispatch function and other methods in koa-router rely on this, so
8180
// we need to attach this property to our dispatch function, too.
8281
instrumentedDispatch.router = dispatch.router;

packages/core/src/tracing/instrumentation/messaging/amqp.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ function instrumentedChannelModelGet(ctx, originalGet, originalArgs) {
303303
return result;
304304
});
305305
}
306-
return promise;
307306
});
308307
}
309308

packages/core/src/tracing/instrumentation/messaging/bull.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ function instrumentedJobCreate(ctx, originalJobCreate, originalArgs, options) {
111111
return err;
112112
});
113113
}
114-
115-
finishSpan(null, null, span);
116-
return promise;
117114
});
118115
}
119116

@@ -279,10 +276,6 @@ function instrumentedProcessJob(ctx, originalProcessJob, originalArgs) {
279276
throw err;
280277
});
281278
}
282-
283-
finishSpan(null, null, span);
284-
delete options.X_INSTANA_L;
285-
return promise;
286279
});
287280
}
288281

packages/core/src/tracing/instrumentation/messaging/kafkaJs.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ function instrumentedSend(ctx, originalSend, originalArgs, topic, messages) {
112112
throw error;
113113
});
114114
}
115-
return promise;
116115
});
117116
}
118117

@@ -194,7 +193,6 @@ function instrumentedSendBatch(ctx, originalSendBatch, originalArgs, topicMessag
194193
throw error;
195194
});
196195
}
197-
return promise;
198196
});
199197
}
200198

0 commit comments

Comments
 (0)