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-propoption 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:trueExample:
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-propoption withdsconfig.The server generates a correlation ID for every HTTP request and sends it in the response through the
Correlation-Idresponse header.Example:
This example changes the
correlation-id-response-headerproperty 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-propoption 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