Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Correlation ID for ServiceNow Table REST API and Transaction Logs

rishabhj007
Tera Contributor

Hey everyone,

When using the ServiceNow Table REST API, I'm looking for a method to correlate each API call with its corresponding transaction log entry within ServiceNow.

- Ideally, I'd like to identify a value within the REST API response (either in the header or body) that can serve as a correlation ID. Does ServiceNow provide such a pre-existing value in the response for correlation purposes?

- If a pre-existing value isn't available, is there an alternative approach, such as sending a custom header (e.g., 'X-trace-id') in the API request, to ensure that a correlation identifier is included in the ServiceNow transaction logs?


- It's important to note that using the glide.rest.debug system property is not a viable solution for production environments due to its potential performance impact.

Thanks a lot!!!

1 ACCEPTED SOLUTION

Kieran Anson
Kilo Patron

Hi,

x-transaction-id should be a header already returned. The value provided here is the starting value of the syslog_transaction record.
 
KieranAnson_0-1739278555943.png

 

KieranAnson_2-1739278572537.png

 

 

View solution in original post

4 REPLIES 4

Kieran Anson
Kilo Patron

Hi,

x-transaction-id should be a header already returned. The value provided here is the starting value of the syslog_transaction record.
 
KieranAnson_0-1739278555943.png

 

KieranAnson_2-1739278572537.png

 

 

Hey @Kieran Anson ,
Thanks for the solution! What are your thoughts on the "glide_session_store" cookie that appears in the header? I've noticed it being logged in the "SESSION" column within the transactions section of the system logs.

rishabhj007
Tera Contributor

@Kieran Anson,
Thanks for the solution. What is your opinion on the "glide_session_store" cookie for correlating SNOW transactions?
I've observed that it is logged as "SESSION" in system logs.   

Hi,

Full details on cookie usage can be found here: https://support.servicenow.com/kb?id=kb_article_view&sys_kb_id=5fad5e6247f4f110f64de825126d4326 

 

If you want to persist a session, and avoid needing to complete TLS handshake and node routing, you'd use the following 3 cookies:

  • JSESSIONID
  • glide_user_route
  • glide_session_store

Note there are pro's and con's to persisting a session, most notably focusing transactions on a single node.