Log data is reported as a JSON document. Log format determines whether log data identification information will be included and how the data is formatted. Each type of log format is described below.
-
JSON: This format includes:
- Top-level name/value pairs that uniquely identify the set of log entries reported in the JSON document.
- An object for each log entry associated with the current JSON document.
-
JSON Array: This format generates a JSON document that contains an array of objects. Each object is a log entry associated with the current JSON document.
-
JSON Lines: This format generates an invalid JSON document that contains an object on each line. Each object is a log entry associated with the current JSON document. This object is an exact match for an object contained by the Logs array.
-
CSV: This format generates a comma-separated value (CSV) document with the following format:
- First Line: Identifies the set of log fields that will be reported for each log entry and the order in which data for these fields will be reported. View log field definitions within the Logs Array section.
- Subsequent Lines: Each subsequent line contains a log entry. Each log entry contains comma-separated values for the log fields identified in the first line.
Adding or removing log fields may alter the order in which they are reported within a CSV document. It is important to rely on the CSV’s first line to identify the set of log fields that are reported for each log entry and the order in which data for those fields will be provided.
If log data uses either the CSV, JSON Array, or JSON Lines log format, then it will not contain information that uniquely identifies a set of log data. If log data using one of these formats is delivered to a destination other than AWS S3, Azure Blob Storage, or Google Cloud Storage, then there is no way to check for gaps in sequence numbers when attempting to identify missing log data.
A log entry describes a HTTP/HTTPS request that was submitted to our CDN.
Top-Level Name/Value Pairs
Top-level name/value pairs are unavailable for the CSV, JSON Array, and JSON Lines log formats. If you require this information, please choose the standard JSON log format.
Top-level name/value pairs are described below.
-
account_number (String): Customer AN. Identifies an environment by its legacy system-defined ID.
-
agent_id (String): Agent ID. Indicates the unique ID that identifies the Real-Time Log Delivery software agent that generated the log data.
-
datestamp (String): Date Stamp. Indicates the date on which the log data was generated.Syntax:
YYYYMMDD
Example:20230412
-
logs (Array of objects): Log Data. Describes the log entries associated with the current JSON document. Each object contains a set of fields that describe the request/response for a single log entry.
-
profile_id (Integer): Profile ID. Identifies a RTLD profile by its system-defined ID.
-
seq_num (Integer): Sequence Number. Indicates the sequential number that identifies the order in which the log data was generated by the software agent identified by the
agent_id
field. -
service (String): Service. Returns
serverless
.
logs Array
The
logs
array contains an object for each log entry associated with the current JSON document. Each log entry describes each request processed by Cloud Functions, including Edgio Sites requests, through the following fields:-
client_ip (String): Client IP. (Category: Client Network) Indicates the IP address for the device that submitted the request.
-
deployment_version (String): Edgio deployment version. (Category: Deployment) Identifies a deployment by its version number.
-
dri_data (String): DRI data. (Category: Application) Describes the request logged by Deep Request Inspection through the following fields:
-
bodyLength: Indicates the length of the payload.
-
bodyTruncated: Indicates whether the payload was truncated.
-
duration: Indicates the total length of time, in milliseconds, for an upstream request. This metric measures the duration between when a request is submitted from the Edgio cloud and a response is received from an origin server.
-
headers: Contains request headers.
-
host: Indicates the request’s host.
-
method: Indicates the request’s HTTP method (e.g.,
GET
,HEAD
, andPOST
). -
path: Indicates the URL path for the content that was requested, posted, or deleted. This URL, which excludes the query string, is reported as a relative path that starts directly after the hostname.
-
protocol: Indicates the request’s scheme. Valid values are:
http: | https:
-
statusCode: Indicates the HTTP status code for the response.
-
statusMessage: Indicates the HTTP status message for the response.
-
-
environment_id (String): Environment ID. (Category: Deployment) Indicates the system-defined ID for the environment through which this request was served.
-
function_id (String): Function ID. (Category: Function) Indicates the function’s ID.
-
level (String): Log Level. (Category: Application) Indicates either the severity of the console message or log data type. Valid values are:
- 10: Trace. This severity is indicative of detailed application logging or log data generated by an external library used by your application.
- 20: Debug. This severity contains more detailed information than Info console messages.
- 30: Info. This severity indicates information describing normal operation within your application.
- 40: Warn. This severity typically indicates an issue that should be investigated as time allows.
- 50: Error. This severity typically indicates that the request was unsuccessful. Errors require investigation and remediation to ensure optimal performance for all users.
- 60: Fatal. This severity, which requires immediate attention, typically indicates that your application will stop or become unusable soon.
- 100: Deep Request Inspection - Downstream request information.
- 101: Deep Request Inspection - Downstream response information.
- 102: Deep Request Inspection - Upstream request information.
- 103: Deep Request Inspection - Upstream response information.
- 104: Deep Request Inspection - Upstream response body information.
-
message (String): Log message. (Category: Application) Contains a console message triggered by the request.
-
organization_id (String): Organization ID. (Category: Deployment) Indicates an organization’s system-defined ID. This organization owns the property associated with this request.
-
region (String): Region. (Category: Function) Indicates the AWS region where the request was processed.
-
request_id (String): Request ID. (Category: Request) Indicates the unique ID assigned to the request.
-
rtld_profile_name (String): RTLD Profile Name. (Category: General) Indicates the name of the RTLD profile.
-
source (String): Source. (Category: Application) Indicates whether the source of the log message is due to the application or Deep Request Inspection (DRI). Valid values are:
APPLICATION | DRI
-
stack_trace (String): Stack trace. (Category: Application) Contains the stack trace triggered by the request.
-
timestamp (Decimal): Timestamp. (Category: Request) Indicates the Unix time, in seconds, at which the request was submitted.Syntax:
<SECONDS>.<MICROSECONDS>
Sample Log Data
Sample log data that contains two log entries is provided below for all four log formats.
JSON
1{2 "agent_id": "1EEE0000727EEB65",3 "seq_num": 0,4 "service": "serverless",5 "account_number": "0001",6 "profile_id": 2,7 "datestamp": "20240311",8 "logs": [{9 "timestamp": 1710186605.046000000,10 "client_ip": "192.0.2.141",11 "function_id": "ac3f16",12 "request_id": "08b7d67a-2022-4cf4-9604-03740face332",13 "region": "us-west-1",14 "level": 100,15 "compute_instance": "53331000-d0ca-48b6-a09c-afde4ccc41be",16 "stack_trace": "",17 "organization_id": "cc14e5b2-0d65-49c8-ad82-f602b9b29cca",18 "environment_id": "c26fe99f-7897-4b8c-894c-5954955c7c88",19 "deployment_version": 10,20 "message": "",21 "source": "DRI",22 "dri_data": {23 "method": "GET",24 "path": "/api/upstream-double",25 "host": "prod-nextjs-v7-default.glb.edgio.link",26 "headers": {27 "x-forwarded-for": "192.0.2.141, 192.0.2.36",28 "x-forwarded-proto": "https",29 "x-forwarded-port": "443",30 "host": "prod-nextjs-v7-default.glb.edgio.link",31 "x-amzn-trace-id": "Root=1-62ef606d-63351bd52c0ec1e66d14ca8d",32 "user-agent": "curl/8.1.2",33 "accept": "*/*",34 "x-host": "prod-nextjs-v7-default.glb.edgio.link",35 "x-cloud-functions-hint": "proxy:0",36 "x-edg-version": "9 10 8 7.9.0 2024-03-11T12:29:03Z 6d6830d9-56d3-49b8-8319-f7821af7d857",37 "x-request-id": "08b7d67a-2022-4cf4-9604-03740face332"38 },39 "protocol": "https:"40 }41 }, {42 "timestamp": 1710186662.553000000,43 "client_ip": "192.0.2.141",44 "function_id": "ac3f16",45 "request_id": "8ecbe38d-6815-427d-b28f-0043ff23fa2e",46 "region": "us-west-1",47 "level": 100,48 "compute_instance": "53331000-d0ca-48b6-a09c-afde4ccc41be",49 "stack_trace": "",50 "organization_id": "cc14e5b2-0d65-49c8-ad82-f602b9b29cca",51 "environment_id": "c26fe99f-7897-4b8c-894c-5954955c7c88",52 "deployment_version": 10,53 "message": "",54 "source": "DRI",55 "dri_data": {56 "method": "GET",57 "path": "/api/upstream-double",58 "host": "prod-nextjs-v7-default.glb.edgio.link",59 "headers": {60 "x-forwarded-for": "192.0.2.141, 192.0.2.36",61 "x-forwarded-proto": "https",62 "x-forwarded-port": "443",63 "host": "prod-nextjs-v7-default.glb.edgio.link",64 "x-amzn-trace-id": "Root=1-62ef60a6-041fb9871f54061011d68c00",65 "user-agent": "curl/8.1.2",66 "accept": "*/*",67 "x-host": "prod-nextjs-v7-default.glb.edgio.link",68 "x-cloud-functions-hint": "proxy:0",69 "x-edg-version": "9 10 8 7.9.0 2024-03-11T12:29:03Z 6d6830d9-56d3-49b8-8319-f7821af7d857",70 "x-request-id": "8ecbe38d-6815-427d-b28f-0043ff23fa2e"71 },72 "protocol": "https:"73 }74 }75 ]76}
JSON_Array
1[{2 "timestamp": 1710186605.046000000,3 "client_ip": "192.0.2.141",4 "function_id": "ac3f16",5 "request_id": "08b7d67a-2022-4cf4-9604-03740face332",6 "region": "us-west-1",7 "level": 100,8 "compute_instance": "53331000-d0ca-48b6-a09c-afde4ccc41be",9 "stack_trace": "",10 "organization_id": "cc14e5b2-0d65-49c8-ad82-f602b9b29cca",11 "environment_id": "c26fe99f-7897-4b8c-894c-5954955c7c88",12 "deployment_version": 10,13 "message": "",14 "source": "DRI",15 "dri_data": {16 "method": "GET",17 "path": "/api/upstream-double",18 "host": "prod-nextjs-v7-default.glb.edgio.link",19 "headers": {20 "x-forwarded-for": "192.0.2.141, 192.0.2.36",21 "x-forwarded-proto": "https",22 "x-forwarded-port": "443",23 "host": "prod-nextjs-v7-default.glb.edgio.link",24 "x-amzn-trace-id": "Root=1-62ef606d-63351bd52c0ec1e66d14ca8d",25 "user-agent": "curl/8.1.2",26 "accept": "*/*",27 "x-host": "prod-nextjs-v7-default.glb.edgio.link",28 "x-cloud-functions-hint": "proxy:0",29 "x-edg-version": "9 10 8 7.9.0 2024-03-11T12:29:03Z 6d6830d9-56d3-49b8-8319-f7821af7d857",30 "x-request-id": "08b7d67a-2022-4cf4-9604-03740face332"31 },32 "protocol": "https:"33 }34 }, {35 "timestamp": 1710186662.553000000,36 "client_ip": "192.0.2.141",37 "function_id": "ac3f16",38 "request_id": "8ecbe38d-6815-427d-b28f-0043ff23fa2e",39 "region": "us-west-1",40 "level": 100,41 "compute_instance": "53331000-d0ca-48b6-a09c-afde4ccc41be",42 "stack_trace": "",43 "organization_id": "cc14e5b2-0d65-49c8-ad82-f602b9b29cca",44 "environment_id": "c26fe99f-7897-4b8c-894c-5954955c7c88",45 "deployment_version": 10,46 "message": "",47 "source": "DRI",48 "dri_data": {49 "method": "GET",50 "path": "/api/upstream-double",51 "host": "prod-nextjs-v7-default.glb.edgio.link",52 "headers": {53 "x-forwarded-for": "192.0.2.141, 192.0.2.36",54 "x-forwarded-proto": "https",55 "x-forwarded-port": "443",56 "host": "prod-nextjs-v7-default.glb.edgio.link",57 "x-amzn-trace-id": "Root=1-62ef60a6-041fb9871f54061011d68c00",58 "user-agent": "curl/8.1.2",59 "accept": "*/*",60 "x-host": "prod-nextjs-v7-default.glb.edgio.link",61 "x-cloud-functions-hint": "proxy:0",62 "x-edg-version": "9 10 8 7.9.0 2024-03-11T12:29:03Z 6d6830d9-56d3-49b8-8319-f7821af7d857",63 "x-request-id": "8ecbe38d-6815-427d-b28f-0043ff23fa2e"64 },65 "protocol": "https:"66 }67 }68]
JSON_Lines
1{"timestamp": 1710186605.046000000, ...}2{"timestamp": 1710186662.553000000, ...}
CSV
1timestamp,function_id,region,...,source21710186605.046000000,"ac3f16","us-west-1",..,"DRI"31710186662.553000000,"ac3f16","us-west-1",..,"DRI"