Standard debug headers
To enable request-level debugging your request needs to include either:
- The Akamai-Debug header with the proper enhanced debug options configured via the Enhanced Debug behavior OR
- A Pragma header with the proper value.
You should use the Akamai-Debug headers. Pragma-based debugging may be deprecated in the future. To use Pragma debug headers, you need to turn off the Disable Pragma Debugging option in the Enhanced Debug behavior.
A request that includes one of the above debugging headers returns the related trace response headers. The Standard debug header provides details and the status type of the EdgeWorkers function executed during the request or response.
See Enable enhanced debug headers for instructions on how to return more detailed response headers that include a status message and the amount of wall time, CPU time, and memory usage consumed by the event handler. Enhanced debug headers can also provide information about HTTP sub-requests.
Watch this four minute video to learn how to get started debugging your EdgeWorkers code using standard debug headers.
You can add one or more of the following Pragma header values or Akamai-Debug header options to your request.
To use Pragma header values for debugging when your configuration includes the Enhanced Debug behavior, you need to either turn off the “Disable Pragma Debugging” option in the behavior, or provide an EdgeWorkers Akamai-EW-Trace enhanced debug token.
Pragma and Akamai-Debug headers
| Pragma Header | Akamai-Debug Header | Returns debug information from |
|---|---|---|
akamai-x-ew-debug | ew | the onClientRequest, onClientResponse, onOriginRequest, and onOriginResponse event handlers |
akamai-x-ew-responseprovider | ewrprv | only the responseProvider event handler |
akamai-x-ew-debug-rp | ewdrp | only the responseProvider event handlerThis provides additional information with multi-part response when used in Enhanced debug headers mode. |
akamai-x-ew-onclientrequest | ewcrqs | only the onClientRequest event handler |
akamai-x-ew-onoriginrequest | eworqs | only the onOriginRequest event handler |
akamai-x-ew-onoriginresponse | eworsp | only the onOriginResponse event handler |
akamai-x-ew-onclientresponse | ewcrsp | only the onClientResponse event handler |
akamai-x-ew-debug-subs | ewdsub | all event handlers when an HTTP sub-request is made when used in Enhanced debug header mode |
akamai-x-ew-onbotsegmentavailable | ewbsa | only the onBotSegmentAvailable event handler |
akamai-x-ew-subworkers | ewsub | used when debugging a chain of subWorkers |
akamai-x-ew-log | ewlog | only for adjusting javascript log level in Enhanced debug header mode. Refer to JavaScript logging for usage. |
Updated 9 days ago
