Configuring HTTP correlation ID support
About this task
Correlation ID support is enabled by default for each HTTP Connection Handler.
Steps
-
To enable or disable correlation ID support for the HTTPS Connection Handler, use the
set-connection-handler-prop
option withdsconfig
.Example:
This example shows how to enable correlation ID support.
$ dsconfig set-connection-handler-prop \ --handler-name "HTTPS Connection Handler" \ --set use-correlation-id-header:true
Example:
This example shows how to disable correlation ID support.
$ dsconfig set-connection-handler-prop \ --handler-name "HTTPS Connection Handler" \ --set use-correlation-id-header:false
-
To customize the response header name for the correlation ID, use the
set-connection-handler-prop
option withdsconfig
.The server generates a correlation ID for every HTTP request and sends it in the response through the
Correlation-Id
response header.Example:
This example changes the
correlation-id-response-header
property value toX-Request-Id
.$ dsconfig set-connection-handler-prop \ --handler-name "HTTPS Connection Handler" \ --set correlation-id-response-header:X-Request-Id
-
To designate the names of one or more HTTP request headers that contain an existing correlation ID value, use the
set-connection-handler-prop
option withdsconfig
.This enables the server to integrate with a larger system consisting of every servers using correlation IDs.
By default, the server generates a new, unique correlation ID for each HTTP request and ignores any correlation ID that might be set on the request.
Example:
$ dsconfig set-connection-handler-prop --handler-name "HTTPS Connection Handler" \ --set correlation-id-request-header:X-Request-Id \ --set correlation-id-request-header:X-Correlation-Id \ --set correlation-id-request-header:Correlation-Id \ --set correlation-id-request-header:X-Amzn-Trace-Id