Description
DebugProbe currently records ResponseSize based on the captured or marker response body size.
When response body capture is limited or skipped, this value may not represent the actual number of bytes sent to the client.
Current Behavior
DebugProbeMiddleware records ResponseSize from the captured response body content.
This means ResponseSize can show:
- the truncated captured body size
- the marker text size
- or another internal capture value
instead of the real response payload size.
Expected Behavior
ResponseSize should represent the actual response size sent by the application whenever possible.
Captured body size and actual response size should not be confused.
Suggested Fix
Track the actual number of response bytes written to the response stream.
Recommended behavior:
ResponseSize should store actual bytes sent to the client.
- Captured body content should remain limited by
MaxBodyCaptureSizeKb.
- If actual size cannot be determined, use
null or a clear fallback value.
- Avoid using marker text length as the response size.
Result
After this change:
- Response size reporting becomes accurate.
- Truncated captures no longer produce misleading size values.
- Dashboard data better reflects real HTTP behavior.
- Debugging large responses becomes more reliable.
Description
DebugProbe currently records
ResponseSizebased on the captured or marker response body size.When response body capture is limited or skipped, this value may not represent the actual number of bytes sent to the client.
Current Behavior
DebugProbeMiddlewarerecordsResponseSizefrom the captured response body content.This means
ResponseSizecan show:instead of the real response payload size.
Expected Behavior
ResponseSizeshould represent the actual response size sent by the application whenever possible.Captured body size and actual response size should not be confused.
Suggested Fix
Track the actual number of response bytes written to the response stream.
Recommended behavior:
ResponseSizeshould store actual bytes sent to the client.MaxBodyCaptureSizeKb.nullor a clear fallback value.Result
After this change: