apm-agent-dotnet
apm-agent-dotnet copied to clipboard
Do not always set request.body to [REDACTED] if reading body is not possible
Our doc for CaptureBody says:
If the request has a body and this setting is disabled, the body will be shown as [REDACTED].
However, here in the code we set the body to [REDACTED] always if we can't read the body. There are cases where based on the CaptureBody setting we'd read the body, but the agent is unable to do so. E.g. here.
So the situation is:
- Request body is set to something other than 'off' and the body would be captured
- Agent tries to capture it, but it fails to do so (e.g. due to buffering setting).
Current behaviour: we set body to [REDACTED] as if the setting would be off. This is confusing.
Expected behaviour: the body should remain empty. (Plus the agent print waring log already).
Hi folks, I have been facing this exact issue today.
It is indeed very confusing. Should we update the documentation ?
Should we fix this ?