Skip to content

Commit

Permalink
fix(http): listen to close event instead of end
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 21, 2023
1 parent 47444f2 commit 746f78c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ export class HttpInstrumentation extends InstrumentationBase<Http> {

context.bind(context.active(), response);
this._diag.debug('outgoingRequest on response()');
response.on('end', () => {
this._diag.debug('outgoingRequest on end()');
response.on('close', () => {
this._diag.debug('outgoingRequest on close()');
let status: SpanStatus;

if (response.aborted && !response.complete) {
Expand Down

0 comments on commit 746f78c

Please sign in to comment.