function validateProperCorellation(action) {
    for (const transaction of action.transactions || []) {
      const req = lodash.get(transaction, 'request.headers'),
            res = lodash.get(transaction, 'response.headers');            
      const strreq = JSON.stringify(req),
            strres = JSON.stringify(res);
        
      if (strreq && strreq.includes('X-Log-Token')) {
          if (strres && strres.includes('X-Log-Token')) {
              return true;
          }
          return 'A consumer defined correlation token includes X-Log-Token in response';
        }
      }
      return true;
    }
/*
    Validates that a consumer defined correlation is defined in the response.

  @targets: Action
  @minim: true
  */
Validates that a consumer defined correlation is defined in the response.
Validates that a consumer defined correlation is defined in the response .
function validateProperCorellation(action) {
    for (const transaction of action.transactions || []) {
      const req = lodash.get(transaction, 'request.headers'),
            res = lodash.get(transaction, 'response.headers');            
      const strreq = JSON.stringify(req),
            strres = JSON.stringify(res);
      if (strreq && strreq.includes('X-Log-Token')) {
          if (strres && strres.includes('X-Log-Token')) {
              return true;
          }
          return 'A consumer defined correlation token includes X-Log-Token in response';
        }
      }
      return true;
    }
function validateProperCorellation ( action ) { for ( const transaction of action . transactions || [ ] ) { const req = lodash . get ( transaction , 'request.headers' ) , res = lodash . get ( transaction , 'response.headers' ) ; const strreq = JSON . stringify ( req ) , strres = JSON . stringify ( res ) ; if ( strreq && strreq . includes ( 'X-Log-Token' ) ) { if ( strres && strres . includes ( 'X-Log-Token' ) ) { return true ; } return 'A consumer defined correlation token includes X-Log-Token in response' ; } } return true ; }
Validates that a consumer defined correlation is defined in the response.
Validates that a consumer defined correlation is defined in the response .