APM agent is adding the CorID header to the requests

book

Article ID: 193016

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) CA Application Performance Management (APM / Wily / Introscope) INTROSCOPE DX Application Performance Management

Issue/Introduction

We had problems with some tests from api jboss. The services that the api accesses reject requests with headers not supported by them. We identified that the APM agent is adding the CorID header to the requests and this caused the HTTP 400 error return (Bad Request). We tried to disable the addition of CorID by passing the parameters below to the JVM using -D, but there is not successful.  For the application to work, we had to disable the APM agent at the start of the JVM.

Parameters passed to the JVM using the -D option:

com.wily.introscope.agent.soapheaderread.enabled=false
com.wily.introscope.agent.soapheaderinsertion.enabled=false
com.wily.introscope.agent.httpheaderread.enabled=false
com.wily.introscope.agent.httpheaderinsertion.enabled=false

Excerpt of application log with information of the request sent containing the CorID header.

DEBUG 1 --- [ XNIO-1 task-1] s.n.www.protocol.http.HttpURLConnection : [email protected] pairs: {POST /api/v1/in/28175303/msgs HTTP/1.1: null}{User-Agent: EVALCryptoSPI/0.3}{Content-Type: application/xml; charset=utf-8}{Content-Encoding: gzip}{Accept: application/xml; charset=utf-8}{Accept-Encoding: gzip}{CorID: 7A851C740A851B981F2F9244FD27A234,1:1,0,0,,,AgAAAOFIQgAAAAFGAAAAAQAAABFqYXZhLnV0aWwuSGFzaE1hcAAAAANIQgAAAAJGAAAAAgAAABBqYXZhLmxhbmcuU3RyaW5nAApUeG5UcmFjZUlkSEIAAAADRQAAAAIAITdBODNDQzNCMEE4NTFCOTgxRjJGOTI0NEJEMTUyMTAfjkfahfjdlACABNDYWxsZXIgQ29tcG9uZW50IElESEIAAAAFRQAAAAIAATNIQgAAAAZFAAAAAgAPQ2FsbGVyVGltZXN0YW1wSEIAAAAHRQAAAAIADTE1OTExOTM0NDQ4NDQ=}{Host: <URL> }{Connection: keep-alive}{Content-Length: 10}

How to disable the inclusion of the CorID header by the APM agent?

Environment

Release : 10.7

Component : APM Agents

Resolution

Please take the following steps.

1- Add the following properties in IntroscopeAgent.profile file.

com.wily.introscope.agent.soapheaderread.enabled=false
com.wily.introscope.agent.soapheaderinsertion.enabled=false
com.wily.introscope.agent.httpheaderread.enabled=false
com.wily.introscope.agent.httpheaderinsertion.enabled=false

2- Comment out "httpcorrelation.pbd" in "jboss-typical.pbl"  file.

3- Comment out the following line under "# Correlation" in webservices.pbd file.
# Correlation
TraceOneMethodWithParametersIfFlagged: JBOSS_CLIENT_JAXWS_TRACING_CORR invoke JBOSS_CLIENT_JAX_WS_CORR_TRACER "WebServices"

Example:
#TraceOneMethodWithParametersIfFlagged: JBOSS_CLIENT_JAXWS_TRACING_CORR invoke JBOSS_CLIENT_JAX_WS_CORR_TRACER "WebServices"

Recycle the JVM.