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)
697
697
698
698
throw ;
699
699
}
700
+ }
700
701
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 ( ) ;
708
709
709
- Snapshots = Snapshots . AddRange ( snapshots ) ;
710
- }
710
+ Snapshots = Snapshots . AddRange ( snapshots ) ;
711
711
}
712
712
713
713
private void HandlePotentialDiagnosticsData ( MockHttpRequest request )
@@ -724,7 +724,14 @@ private void HandlePotentialDiagnosticsData(MockHttpRequest request)
724
724
using var streamReader = new StreamReader ( stream ) ;
725
725
var batch = streamReader . ReadToEnd ( ) ;
726
726
727
- ReceiveDiagnosticsBatch ( batch ) ;
727
+ if ( batch . StartsWith ( "[{\" debugger\" :{\" snapshot\" :" , StringComparison . OrdinalIgnoreCase ) )
728
+ {
729
+ ReceiveDebuggerBatch ( batch ) ;
730
+ }
731
+ else
732
+ {
733
+ ReceiveDiagnosticsBatch ( batch ) ;
734
+ }
728
735
}
729
736
catch ( Exception ex )
730
737
{
You can’t perform that action at this time.
0 commit comments