Hello Community, Is there a way in Microgateway to read value of request id 'i' in the code?
We wish to capture the value of i below and associate with logging (header values) which we are doing exclusively. This way we would include our log entry into the correlation.
1436403888651 info req m=GET, u=/, h=localhost:8000, r=::1:59715, i=69873690-1147-11e9-aa6a-3d82cd4be518
Is it possible to capture the value generated by
const correlation_id = uuid.v1(); from https://github.com/apigee/microgateway-core/blob/master/lib/plugins-middleware.js into a custom plugin ? |
Old post but in case someone else wants to know ....
Looking at fixes for microgateway-core code for the logger, (lib/logging.js) you find mention of
record.i=req.correlationId;
Having compared this to the "i=" value found in logs, it is the same value.
So in your plugin (traffic section), you have access to - req.correlationId.