Capture Body in request errors is not working (Java agent)

Hi,

I have APM 6.5 and java agent v1.
The agent is configured with -Delastic.apm.capture_body=errors
But in APM UI, when I go to errors tab, the body has the value [REDACTED].

Also i have configured the transaction_sample_rate with 0.1,
Does this setting affect to capture_body?

Hi Pablo and thanks for checking out the Java agent!

Note that capture_body can currently only capture form parameters at the moment. See https://www.elastic.co/guide/en/apm/agent/java/current/config-http.html#config-capture-body.

Cheers,
Felix

Sorry, I didn't understand you.

I have an aplication running with -Delastic.apm.capture_body=errors. This flag capture body request when that request is an error. But when i check that errors, bodies have [REDACTED] value.

When that body is captured?

Thanks for reply!

That's correct. But it can't capture arbitrary request bodies like JSON documents sent to your server. It currently only works when the body contains a application/x-www-form-urlencoded request body.

What type of request bodies are you trying to capture?

Cheers,
Felix

Thanks for reply, I thought that the all bodies from the request flagged as error was sent to APM.

I'm trying to capture an application/json body, now I've realized that is not supported. There are a way to get it?

Thanks for your help!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.