Skip to content

Commit

Permalink
Update experimental/packages/opentelemetry-instrumentation-http/src/h…
Browse files Browse the repository at this point in the history
…ttp.ts

Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
  • Loading branch information
SimenB and legendecas authored Mar 20, 2023
1 parent d99e1a2 commit afc6236
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export class HttpInstrumentation extends InstrumentationBase<Http> {
request.prependListener(
'response',
(response: http.IncomingMessage & { aborted?: boolean }) => {
// if there are no other response listeners, we don't wanna set this as there won't ever be any response
// if there are no other response listeners, we don't wanna set this as the data of the response is not consumed and no 'end' event is emitted.
if (request.listenerCount('response') > 1) {
requestHasResponse = true;
}
Expand Down

0 comments on commit afc6236

Please sign in to comment.