File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed
tracer/test/Datadog.Trace.TestHelpers Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -697,17 +697,17 @@ private void HandlePotentialDebuggerData(MockHttpRequest request)
697697
698698 throw ;
699699 }
700+ }
700701
701- void ReceiveDebuggerBatch ( string batch )
702- {
703- var snapshots =
704- JArray
705- . Parse ( batch )
706- . Select ( token => token . ToString ( ) )
707- . ToList ( ) ;
702+ private void ReceiveDebuggerBatch ( string batch )
703+ {
704+ var snapshots =
705+ JArray
706+ . Parse ( batch )
707+ . Select ( token => token . ToString ( ) )
708+ . ToList ( ) ;
708709
709- Snapshots = Snapshots . AddRange ( snapshots ) ;
710- }
710+ Snapshots = Snapshots . AddRange ( snapshots ) ;
711711 }
712712
713713 private void HandlePotentialDiagnosticsData ( MockHttpRequest request )
@@ -724,7 +724,14 @@ private void HandlePotentialDiagnosticsData(MockHttpRequest request)
724724 using var streamReader = new StreamReader ( stream ) ;
725725 var batch = streamReader . ReadToEnd ( ) ;
726726
727- ReceiveDiagnosticsBatch ( batch ) ;
727+ if ( batch . StartsWith ( "[{\" debugger\" :{\" snapshot\" :" , StringComparison . OrdinalIgnoreCase ) )
728+ {
729+ ReceiveDebuggerBatch ( batch ) ;
730+ }
731+ else
732+ {
733+ ReceiveDiagnosticsBatch ( batch ) ;
734+ }
728735 }
729736 catch ( Exception ex )
730737 {
You can’t perform that action at this time.
0 commit comments