APM JAVA/NodeJS - Capture Body Request for Backend connections

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text :slight_smile:

TIP 1: select at least one tag that further categorizes your topic. For example server for APM Server related questions, java for questions regarding the Elastic APM Java agent, or ui for questions about the APM App within Kibana.

TIP 2: Check out the troubleshooting guide first. Not only will it help you to resolve common problems faster but it also explains in more detail which information we need before we can properly help you.

Kibana version: 7.12.1

Elasticsearch version: 7.12.1

APM Server version: 7.12.1

APM Agent language and version: Java v1.23 / NodeJS 3.x

Browser version: Chrome, Firefox

Original install method (e.g. download page, yum, deb, from source, etc.) and version: Download from Elastic site

Fresh install or upgraded from other version?: Fresh Installation

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.: Elastic APM agents connect to HAProxy APM Server and APM Server to Elastic.

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant): NA

Steps to reproduce:

  1. Implement Elastic APM Agent (Java - NodeJS) into application
  2. Configure all parameters to capture body for application request.
  3. Check into APM module into Kibana and check if body for application request is show or not.

Errors in browser console (if relevant): NA

Provide logs and/or server output (if relevant): NA

We need to know if Elastic APM Agent for Java & NodeJS, can capture body for this two scenarios:

  1. When application received any request (incoming) we saw body request into field "http.request.body.original", but we want to know if apm agent can capture what was response by application.

  2. When application send request for any backend, apm agent can capture body request?

  1. Hi @Ramon_Sanchez_Villan , java agent not capture response body in transactions. Only request body.
  2. When serviceA call serviceB, agent in spans of serviceA not capture request body. But, if serviceB instrumented by agent, too, then http transactions will store request body.

As workaround, you can use addCustomContext. Java agent provides addCustomContext
Same things should be in nodejs agent.

Thanks for your quickly response. Some applications are black box (major for our case) and we cannot modify code, and for white box I will check how we can implement.



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