Auto Create a Custom Property for Akamai Headers
The values of Akamai debug HTTP headers can be extracted, placed into a custom property, and then tracked in analytics using the following steps. This example defines a property set as part of a target after first adding the HTTP request headers to that target(s) in a target that is used in that test.
Add the relevant header request to every
HTTP operation that goes to Akamai. For example, get (as shown below). Additional relevant
Akamai Pragma cache headers include:
Pragma: akamai-x-get-cache-key Pragma: akamai-x-cache-remote-on Pragma: akamai-x-get-true-cache-key
Save the target after making this
change.The example above causes each message response to contain an X-Cache header with
one of a number of possible values which, when placed into a CloudTest widget (as a custom
property’s value) are easy to analyze. Two of the two most common X-cache response values
TCP_MISS.The raw X-Cache header value will indicate a hit or miss for a given object (among a number of other possible responses). Additional X-Cache responses include:
TCP_COOKIE_DENY.By defining a property set to extract the X-Cache header value, place it into a custom property, and save that value to analytics, CloudTest can easily chart the X_Cache values for a given test.
X-Cache: TCP_MISS from a90-84-54-46 (AkamaiGHost/6.6.2-8814863) (-)A
TCP_HITmeans that the object was fresh in cache and/or an object from disk cache. A
TCP_MISSmeans that the object was not in cache, and that the server fetched the object from its origin.
- To add a property set, select the Property Sets node and click the Plus icon to add a new Property Sets form to the message.
- Change “The value of this field” from the default Field to Header.
Since we only want that portion of the
X-Cache header prior to “from” enter a space and then “from” in the Trailing Text field.
Note that the space is included so that there won’t be a trailing space on every extracted
- In the "Will be stored in this property" section of the form, ensure that Type is set to Custom.
- Change Starting Element to "CurrentMessage".
Enter a property path as a name for the
custom property. This name will appear as a node in Property Value widgets with the
response values shown.
- In the Automatic Creation drop-down, select Create and save value in Analytics.
- Click Save on the toolbar after making these changes.