DataStream 2 logs

DataStream 2 logs provide detailed data about EdgeWorkers usage, including metrics you can use to optimize traffic and solve issues on your Akamai property. The stream collects log data under two data set fields you can choose when configuring DataStream 2, EdgeWorker usage and EdgeWorkers execution.

Refer to the DataStream 2 integration section for steps on how to configure DataStream 2 for EdgeWorkers.

EdgeWorkers usage

Usage information includes details about the EdgeWorker ID, version, event‚Ä® handler, reasons for turning an EdgeWorkers function off, returned errors and metrics‚Ä® such as heap usage, CPU, and wall time. The field returns the data in‚Ä® the following format:

//[EdgeWorker-Id]/[Version]/[Event Handler]/[Off Reason]/[Logic Executed]/[Status]/#[Metrics]

Here's an example of the usage information output:
//4380/4.0/1/-/0/4/#1,2\//4380/4.0/4/-/0/4/#0,0\//4380/4.0/5/-/1/1/#0,0

For instructions on how to add EdgeWorkers usage information to a stream refer to the data set parameters in the DataStream 2 documentation.

Field

Description

EdgeWorker Id

The identifier of the EdgeWorkers function.

Version

The EdgeWorker version.

Event Handler

The event handler used to execute the EdgeWorkers function.

Returns one of the following values:
- - No event handler was executed
1 - onClientRequest
2 - onOriginRequest
3 - onOriginResponse
4 - onClientResponse
5 - responseProvider

Off Reason

Indicates why the EdgeWorkers service was turned off.

Returns one of the following values:
- - Metadata indicated EdgeWorkers should be "on"
m - Metadata indicated EdgeWorkers should be "off"
i - Request was "internal" and as such shouldn't execute the EdgeWorkers function, such as:
SureRoute Test Object races, ESI Fragment requests, Intermediary Processing Agent requests, Request was not from End User (not CLIENT_REQ), Akamai Translate or Purge
n - Request not on supported network
g - Akamai edge server failed EdgeWorkers
s - Request was "denied" by a security product

Logic Executed

Was the EdgeWorkers function successfully executed?

Returns one of the following values:
0 - No
1 - Yes

Status

Indicates if the EdgeWorkers event handler execution returned an error.

Returns one of the following values:
0 - Unspecified error
1 - Successful execution
2 - Generic EdgeWorkers error
3 - Could not find the EdgeWorkers identifier
4 - Requested event handler was not implemented by the EdgeWorkers function
5 - A runtime or environment error prevented the EdgeWorkers execution
6 - Error during the EdgeWorkers execution, such as a JavaScript exception or error
7 - EdgeWorkers function timed out
8 - EdgeWorkers function hit preset resource limit
9 - Error receiving or sending data through the RingBuffer
10 - EdgeWorkers is blocked by the Akamai JavaScript execution engine
11 - EdgeWorkers code bundle not available for a particular version
12 - The amount of CPU time consumed by the event handler exceeded the limit
13 - The wall time consumed by the event handler exceeded the limit
14 - The amount of CPU time consumed during initialization by the event handler exceeded the limit
15 - The wall time consumed during initialization by the event handler exceeded the limit

Metrics

Metrics about the execution of the event handler, separated by a comma (,):

CPU Time - The amount of CPU time, in milliseconds, consumed during the event handler initialization.
Wall Time - The total duration, in milliseconds, of the event handler initialization.

EdgeWorkers execution

Execution information includes the fields described in the table below, separated by a colon ‚Äė:‚Äô.

c:4380:7:161:162:161:n:::12473:200|C:4380:3:0:4:0:n:::6967:200|R:4380:20:99:99:1:n:::35982:200

For instructions on how to add EdgeWorkers execution information to a stream refer to the data set parameters in the DataStream 2 documentation.

Field

Description

Stage information

The stage during which the EdgeWorkers function was executed.

Returns one of the following values:
S - Sub-request
c - onClientRequest
o - onOriginRequest
C - onClientResponse
O - onOriginResponse
R - responseProvider
m - Missing stage

EdgeWorker ID

The identifier of the EdgeWorkers function.

EdgeWorker process time (ms)

The amount of time, in milliseconds, it took to process the EdgeWorkers function.

EdgeWorker total time (ms)

The total amount of time used, in milliseconds, it took for the EdgeWorkers function to execute.

Total stage time (ms)

The total amount of stage time used, in milliseconds, it took for the EdgeWorkers function to execute.

Used memory (KB)

The amount of memory used, in kilobytes, it took for the EdgeWorkers function to execute.

Akamai edge server flow

Akamai edge server flow status during the execution.

Returns one of the following values:
n - Normal flow
's - - Akamai JavaScript execution engine not available
r - Termination request
T - Akamai edge server write timeout
t - Akamai edge server read timeout
e - EdgeWorkers returned error
E - Bad input from EdgeWorkers
u - Unexpected Termination Request for non-METHOD_GET method
m - Error in applying EdgeWorkers commands
c - EdgeWorkers result applied from cached results
o - Other

Error Code

Possible errors during the execution.

Returns one of the following values:
0 - unspecified
1 - success - EdgeWorkers function executed successfully
2 - genericError - Unnamed or uncategorized error
3 - unknownEdgeWorker - Unknown EdgeWorker ID
4 - unimplementedHandler - Requested event handler not implemented by EdgeWorkers function
5 - runtimeError - Error at runtime or environment prevented EdgeWorkers execution
6 - executionError - Error during EdgeWorkers execution, such as JavaScript exception or error
7 - timeoutError - EdgeWorkers timed out
8 - resourceLimit - EdgeWorkers hit preset resource limit
9 - ringBufferError - Error receiving or sending data through RingBuffer
10 - blacklisted - EdgeWorkers function is blacklisted by Akamai JavaScript execution engine
11 - bundleVersionUnavailable - EdgeWorkers code bundle unavailable for a particular version
12 - cpuTimeoutError - JavaScript exec CPU timed out
13 - wallTimeoutError - JavaScript exec Wall timed out
14 - initCpuTimeoutError - Init CPU timed out
15 - initWallTimeoutError - Init Wall timed out
16 - responseProviderCancelled - RP cancelled
17 - unsupportedResponseProviderMethod - responseProvider is attempting to run a method other than GET.
18 - EdgeWorker deleted - EdgeWorkers function deleted by user
19 - softwareTooOld - Software too old
20 - erpDrop - Request dropped due to ERP
21 - Error discovered by the Akamai edge server

HTTP status change when response is generated with respondWith API

The status provided as part of the respondWith() JavaScript API:
respondWith(status, headers, body, [deny_reason])

CPU flits consumed during EW processing

The flit cost of the EdgeWorkers execution.

Tier ID used for processing this request

The resource tier of the EdgeWorker ID, either 200 for Dynamic Compute or 100 for Basic Compute.

Internal field 1

This field is for Akamai internal use only.

Internal field 2

This field is for Akamai internal use only.


Did this page help you?