How to enable logging of JSessionID and VCAP_ID in gorouter logs
search cancel

How to enable logging of JSessionID and VCAP_ID in gorouter logs

book

Article ID: 298045

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

Troubleshooting may necessitate enabling logging of JSessionID and VCAP_ID to make sure these headers are being received by Gorouter. 

These headers are necessary for Gorouter to guarantee session affinity / stickiness.

See the following documentation for more information: https://docs.vmware.com/en/VMware-Tanzu-Application-Service/6.0/tas-for-vms/http-routing.html

Environment

Product Version: 2.8

Resolution

In order to enable logging of JESSIONID and VCAP_ID headers, add “Set-Cookie, Cookie” to the "HTTP Headers to Log" field in the OpsManager > PAS/TAS > Networking tab.

By doing this, the JSESSIONID and the __VCAP_ID__ will now show up on the Gorouter access logs and we can confirm if Gorouter is not adhering to the sticky session.

"HTTP headers to log" field can work with any header and not only JSESSIONID and vCAP_ID as explained in "HTTP headers to log" section of TAS doc.