2424const {
2525 ArrayIsArray,
2626 Boolean,
27- DateNow,
2827 Error,
2928 FunctionPrototypeCall,
3029 NumberIsFinite,
@@ -71,7 +70,6 @@ const {
7170 isTraceHTTPEnabled,
7271 traceBegin,
7372 traceEnd,
74- getNextInspectorEventId,
7573 getNextTraceEventId,
7674} = require ( 'internal/http' ) ;
7775const {
@@ -95,14 +93,6 @@ const {
9593 stopPerf,
9694} = require ( 'internal/perf/observe' ) ;
9795
98- const {
99- isEnabled : isInspectorEnabled ,
100- requestWillBeSent,
101- responseReceived,
102- dataReceived,
103- loadingFinished,
104- } = internalBinding ( 'inspector' ) ;
105-
10696const kClientRequestStatistics = Symbol ( 'ClientRequestStatistics' ) ;
10797
10898const dc = require ( 'diagnostics_channel' ) ;
@@ -385,15 +375,14 @@ ObjectSetPrototypeOf(ClientRequest, OutgoingMessage);
385375
386376ClientRequest . prototype . _finish = function _finish ( ) {
387377 FunctionPrototypeCall ( OutgoingMessage . prototype . _finish , this ) ;
388- const url = `${ this . protocol } //${ this . host } ${ this . path } ` ;
389378 if ( hasObserver ( 'http' ) ) {
390379 startPerf ( this , kClientRequestStatistics , {
391380 type : 'http' ,
392381 name : 'HttpClient' ,
393382 detail : {
394383 req : {
395384 method : this . method ,
396- url,
385+ url : ` ${ this . protocol } // ${ this . host } ${ this . path } ` ,
397386 headers : typeof this . getHeaders === 'function' ? this . getHeaders ( ) : { } ,
398387 } ,
399388 } ,
@@ -404,14 +393,6 @@ ClientRequest.prototype._finish = function _finish() {
404393 request : this ,
405394 } ) ;
406395 }
407-
408- if ( isInspectorEnabled ( ) ) {
409- this . _inspectorEventId = getNextInspectorEventId ( ) ;
410- const wallTime = DateNow ( ) ;
411- const timestamp = wallTime / 1000 ;
412- requestWillBeSent ( this . _inspectorEventId , url , this . method , timestamp , wallTime ) ;
413- }
414-
415396 if ( isTraceHTTPEnabled ( ) ) {
416397 this . _traceEventId = getNextTraceEventId ( ) ;
417398 traceBegin ( HTTP_CLIENT_TRACE_EVENT_NAME , this . _traceEventId ) ;
@@ -699,21 +680,6 @@ function parserOnIncomingClient(res, shouldKeepAlive) {
699680 response : res ,
700681 } ) ;
701682 }
702-
703- if ( isInspectorEnabled ( ) && typeof req . _inspectorEventId === 'string' ) {
704- responseReceived ( req . _inspectorEventId , DateNow ( ) / 1000 ) ;
705- let response = '' ;
706- const onData = ( chunk ) => {
707- dataReceived ( req . _inspectorEventId , DateNow ( ) / 1000 , chunk . length ) ;
708- response += chunk . toString ( ) ;
709- } ;
710- res . on ( 'data' , onData ) ;
711- res . on ( 'end' , ( ) => {
712- loadingFinished ( req . _inspectorEventId , response , DateNow ( ) / 1000 , response . length ) ;
713- res . removeListener ( 'data' , onData ) ;
714- } ) ;
715- }
716-
717683 if ( isTraceHTTPEnabled ( ) && typeof req . _traceEventId === 'number' ) {
718684 traceEnd ( HTTP_CLIENT_TRACE_EVENT_NAME , req . _traceEventId , {
719685 path : req . path ,
0 commit comments