Enhanced Debug

Enhanced Debug is a default, secure, and feature-rich method for diagnosing requests that replaces legacy Pragma debugging. It uses a time-limited authentication token generated from a customer-defined secret key to prevent unauthorized access.

See also the Debug Mode match. It explains how you can control other functionality in your property based on whether a specific request is being debugged using enhanced debugging.

Before you begin

Review your configuration and perform the following steps if necessary:

  • Remove any Pragma debugging-specific code, such as the Remove Debug Info rule.
  • Remove any code related to passing a specific header to enable Pragma debugging.
  • If you are using WAF, disable any functionality to strip Pragma request headers.

Implementation

Add the behavior and make sure that the Enable slider is On. You can add it to these rules in your property:

  • The Default Rule. All requests processed by this property will support Enhanced Debug.
  • A custom top-level rule. You can add it in a custom rule that doesn’t have any parents and match criteria.
🚧

By default, Enhanced Debug functionality is applied to all requests. If you add this behavior in a rule that has match criteria defined, all match criteria are ignored for Enhanced Debug.

Features and options

OptionDescription
Debugging EnabledEnable enhanced debugging using the Akamai-Debug request header.
Debug KeySpecify the debug key to validate the debugging auth token when ​Akamai​ processes the request. You also use this debug key to generate the auth token. The debug key value is a 64-byte hex string. To auto-generate a valid random string, click the refresh button. You can reuse the same debug key in your other properties.
Disable Pragma DebuggingWhether you want to allow legacy Pragma debugging. This is disabled by default, meaning that the legacy debugging with the Pragma request header is no longer available. You should only enable Pragma debugging during a transition period, until you have updated all your systems to use Enhanced Debug.
Global Request Number

Specify whether you want to return the Global Request Number (GRN) in the Akamai-GRN response header for all requests, even if the request is not being debugged. For example:

Akamai-GRN: 0.25313217.1562625611.27bb4bb

If you want to return a GRN for all requests, remove any instances of the Global Request Number behavior from your property.

Generate the authentication token

To make an enhanced debugging request, generate an auth token with either:

To generate the token, you need to provide these values:

  • The Debug Key value specified in the Enhanced Debug behavior.
  • A duration for which the token should be valid. This can range from 30 seconds to 1 day.

You can use the same token to debug multiple requests until it expires. A generated token will look like this:

exp=1562789819~acl=%2f_~hmac=06b2aaac06fc420b172cfdaf227459dc2176f5d64e4b6f2648f01980768837cf

The debug examples in this guide abbreviate this to exp=1562789819~acl=%2f_~hmac=06b2...37cf for display purposes only.

Debug your requests

To start debugging and receive comprehensive details in the response, pass the auth token and one or more debugging options with your request.

Specify the auth token

You can pass the auth token either within the header or in a separate header or cookie. The debugging functionality is exactly the same in each method.

Akamai-Debug header. You can pass the auth token as the first value in the Akamai-Debug header, followed by one or more debugging options, separated by blanks:

Akamai-Debug: auth-token option [option...]

See this example with the cache and vars debugging options:

Akamai-Debug: exp=1562789819~acl=%2f*~hmac=06b2...37cf vars cache

akamaidebugtoken cookie. You can pass the auth token in the akamaidebugtoken cookie, and pass only the debugging options in the Akamai-Debug header.

Akamai-Debug: option [option...]

Cookie: akamaidebugtoken=auth-token

See this example with the cache and vars debugging options:

Akamai-Debug: vars cache

Cookie: akamaidebugtoken=exp=1562789819~acl=%2f*~hmac=06b2...37cf

Note that the akamaidebugtoken cookie name is case-sensitive, and must be specified as lower-case.

📘

If you pass an invalid or expired auth token, the Akamai-Debug-Status response header is returned, indicating the specific auth token error. No other debugging response headers are returned.

Example curl request

An example curl request may look like this:

curl "https://www.akamaicustomer.com/abc/def" -H "Akamai-Debug: exp=1562789819~acl=%2f*~hmac=06b2...37cf vars cache"

Or this:

curl "https://www.akamaicustomer.com/abc/def" -H "Cookie: akamaidebugtoken=exp=1562789819~acl=%2f*~hmac=06b2...37cf" -H "Akamai-Debug: vars cache"

Enhanced Debug options

Enhanced debugging offers a modern alternative to the legacy Pragma header debugging method. Instead of passing a long sequence of comma-separated Pragma values, Enhanced Debug provides a concise, simpler alias using "debugging options" which are passed in the Akamai-Debug header. A single debugging option may equate to multiple Pragma values. In addition, Enhanced Debug returns information that is not available using Pragma debugging. Note the following:

  • Multiple debugging options may be specified in the Akamai-Debug header.
  • The order of debugging options in the Akamai-Debug header is ignored.
  • The same debugging option may be specified multiple times in the Akamai-Debug header.

This table shows how the two debugging approaches compare:

🚧

Unsupported debug options

All debug options denoted with an asterisk (*) are currently not supported.

Akamai-Debug valueEquivalent Pragma headersDebug response headers returnedAdditional info
[any value]akamai-x-get-request-idX-Akamai-Request-ID
Akamai-GRN
cacheakamai-x-cache-on,
akamai-x-cache-remote-on,
akamai-x-check-cacheable,
akamai-x-get-cache-key,
akamai-x-get-true-cache-key

X-Cache, X-Cache-Remote
X-Check-Cacheable
X-Cache-Key
X-Cache-Key-Extended-Internal-Use-Only
X-True-Cache-Key

Edge-Cache-Tag
Akamai-Cache-Status
Akamai-Stage-Info-* (multiple)
Akamai-Cache-Info-* (multiple)

ssl or tlsakamai-x-get-ssl-client-session-idX-Akamai- SSL-Client-Sid
Akamai-Connection-Info
varsakamai-x-get-extracted-valuesX-Akamai-Session-InfoReturns all x-akamai-session-info variable headers.
clientakamai-x-get-client-ipX-Akamai-Pragma-Client-IP
Akamai-Client-Info
feoakamai-x-feo-traceX-Akamai-Transformed
X-Akamai-FEO-* (multiple)
roakamai-x-ro-traceX-Akamai-RO-* (multiple)
imakamai-x-im-traceX-Akamai-Session-Info for specified variables
tagsakamai-x-get-cache-tagsEdge-Cache-Tag
allAll values aboveAll headers aboveIncludes every Akamai-Debug value above this line.
a2x-akamai-a2-trace (not included with all)x-akamai-a2-* (multiple)
brotli (legacy) or brakamai-x-get-brotli-status (not included with all)
noneSee The none debugging option section.
novarsExcludes x-akamai-session-info variable headers when using all.
nofeoExcludes x-akamai-transformed or x-akamai-feo-* headers when using all.
ewakamai-x-ew-debugSee EdgeWorkers Standard debug headers.
ewcrqsakamai-x-ew-onclientrequestX-Akamai-EdgeWorker-onClientRequest-InfoSee EdgeWorkers Standard debug headers .
eworqsakamai-x-ew-onoriginrequestX-Akamai-EdgeWorker-onOriginRequest-InfoSee EdgeWorkers Standard debug headers .
ewcrspakamai-x-ew-onclientresponseX-Akamai-EdgeWorker-onClientResponse-InfoSee EdgeWorkers Standard debug headers .
eworspakamai-x-ew-onoriginresponseX-Akamai-EdgeWorker-onOriginResponse-InfoSee EdgeWorkers Standard debug headers .
ewrprv*akamai-x-ew-responseproviderX-Akamai-EdgeWorker-ResponseProvider-InfoSee EdgeWorkers Standard debug headers .
ewlogakamai-x-ew-logSee EdgeWorkers Standard debug headers .
ewdrp*akamai-x-ew-debug-rpX-Akamai-EdgeWorker-ResponseProvider-InfoSee EdgeWorkers Standard debug headers .
ewdsubakamai-x-ew-debug-subsX-Akamai-Edgeworker-SubrequestsSee EdgeWorkers Standard debug headers .
ewsub*akamai-x-ew-subworkersSee EdgeWorkers Standard debug headers .
ewbsaakamai-x-ew-onbotsegmentavailableX-Akamai-EdgeWorker-onBotSegmentAvailable-InfoSee EdgeWorkers Standard debug headers .

The none debugging option

If you specify the none debugging option with a valid auth token, no debugging response headers will be returned, but the Debug Mode match will evaluate to true in your delivery property. This allows you to define processing in your delivery property which should only occur when a request is debugged.

For example, you could define an alternate testing origin which is only used when the Debug Mode match is true. If you specify the none debugging option, all other debugging options are ignored.

Example

If you specify the Akamai-Debug request header:

Akamai-Debug: cache vars

The same debug response headers are returned as if you passed this Pragma request header:

Pragma: akamai-x-get-request-id, akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-true-cache-key, akamai-x-get-extracted-values

It will also return multiple Debug information headers.

Debug information headers

You can use information found in response headers to help during the debugging process. See the table below for details returned in Akamai-specific, debug information headers.

For information specific to returned Pragma headers, see our Pragma headers documentation.

📘

Headers marked with (multiple) such as Akamai-Cache-Info-* (multiple) may have several variants returned for a single request. For example, a request that traverses a child server and a parent server would return both the Akamai-Cache-Info-Child response header and the Akamai-Cache-Info-Parent response header.

Response headerInformation
Akamai-Cache-Info-* (multiple)Shows measurable details about how the cache server handled the specific request.
  • Content: time to load (TTL), cache age
  • Example: Akamai-Cache-Info-Child: Internal-TTL=-1, Current-Age=0
Akamai-Cache-StatusReturns details about whether the requested content was retrieved from cache on the edge (child) or parent server.
  • Example: Akamai-Cache-Status: Miss from child, Hit from parent
Akamai-Client-InfoReturns connection details about the requesting client.
  • Content: IP and connection port, real IP and connection port, connection IP, client round-trip time (RTT) in ms
  • Example: Akamai-Client-Info: Client-IP=12.34.56.78:62932, Client-Real-IP=12.34.56.78:62932, Connected-Client-IP=12.34.78.56, Client-RTT=62
Akamai-CloudletsShows active Cloudlets policies across all supported Cloudlet types.
  • Content: Policy type, name, and matched rule (if any).
  • Example: Akamai-Cloudlets: |RC:prod_policy:Internal URLs|
Akamai-Connection-InfoReturns TLS handshake and certificate information.
  • Content: connection protocol (HTTP, H2, QUIC, etc.), Server Name Indication (SNI), TLS version and cipher used
  • Example: Akamai-Connection-Info: Protocol=h2, SNI-Name=www.example.com, TLS-Version=tls1.3, TLS-Cipher=TLS_AES_256_GCM_SHA384
Akamai-Forward-InfoReturns information about the forward request to your origin.
  • Content: Forward hostname, DNS name, IP, URL, and persistent connection usage.
  • Example: Akamai-Forward-Info: Forward-Hostname=akamaicustomer.com, Forward-DNS-Name=akamaicustomer.com, Forward-IP=12.34.56.78, Forward-URL=/test, Forward-PConn-Used=0
Akamai-GRNSee Global Request Number.
Akamai-Header-InfoReturns metrics for request and response header counts with exclusion tracking. Used for performance analysis and header limit monitoring.
Akamai-Property-InfoReturns basic information about the delivery property used for the request.
  • Content: Property name, version, product type, VCD, and ARLID info.
  • Example: Akamai-Property-Info: akamaicustomer.com v123 (Ion Premier), VCD=1234, ARLID=123456
Edge-Cache-TagReturns any cache tags associated with the requested content.
Akamai-CPCodeReturns the Content Provider Code that applied to the request.
Akamai-TypeCodeReturns the processing Typecode that applied to the request.
Akamai-Debug-StatusReturns the status of the debug processing. This header is only returned if an error occurred during debugging.
  • Content: The error that caused the debug processing to fail.
  • Example: Akamai-Debug-Status: failure:expired_token

Did this page help you?