File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
packages/node/src/integrations Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,11 @@ const _nativeNodeFetchIntegration = ((options: NodeFetchOptions = {}) => {
4444 const url = request . origin ;
4545 return _ignoreOutgoingRequests && url && _ignoreOutgoingRequests ( url ) ;
4646 } ,
47- onRequest : ( { span } : { span : Span } ) => {
47+ onRequest : ( { span, request } : { span : Span ; request : unknown } ) => {
4848 _updateSpan ( span ) ;
4949
5050 if ( _breadcrumbs ) {
51- _addRequestBreadcrumb ( span ) ;
51+ _addRequestBreadcrumb ( span , request ) ;
5252 }
5353 } ,
5454 // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -80,17 +80,23 @@ function _updateSpan(span: Span): void {
8080}
8181
8282/** Add a breadcrumb for outgoing requests. */
83- function _addRequestBreadcrumb ( span : Span ) : void {
83+ function _addRequestBreadcrumb ( span : Span , request : unknown ) : void {
8484 if ( getSpanKind ( span ) !== SpanKind . CLIENT ) {
8585 return ;
8686 }
8787
8888 const data = getRequestSpanData ( span ) ;
89- addBreadcrumb ( {
90- category : 'http' ,
91- data : {
92- ...data ,
89+ addBreadcrumb (
90+ {
91+ category : 'http' ,
92+ data : {
93+ ...data ,
94+ } ,
95+ type : 'http' ,
9396 } ,
94- type : 'http' ,
95- } ) ;
97+ {
98+ event : 'response' ,
99+ request,
100+ } ,
101+ ) ;
96102}
You can’t perform that action at this time.
0 commit comments