1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20


How to debug edge functions on Data Streaming

The debugging process in edge functions’ code on Data Streaming helps you identify if errors are still occurring or if the process was successful.

Before analyzing the process, you need to apply the debugging code. Find out more on Debugging edge functions.

Setting up Data Streaming to debug edge functions

After applying the debugging code for edge functions:

  1. Access RTM.
  2. On the upper-left corner, select Data Streaming on the OBSERVE section.
  3. Click Add Streaming.
  4. Choose a name for your data streaming.
  5. On the Data Source dropdown menu, select Edge Functions.
  6. On the Template dropdown menu, select Custom Template.
  7. On the Data Set code box, add the following variables:
	"time": "$time",
    "global_id": "$global_id",
    "edge_function_id": "$edge_function_id",
    "request_id": "$request_id",
    "log_level": "$log_level",
    "log_message": "$log_message"
  1. On Options, select between Filter Domains or All Domains. See more about each option on How to associate domains on Data Streaming.
  2. On the Destination section, select an Endpoint Type on the dropdown menu. See more about setting an endpoint.
    • You’ll see different fields depending on the endpoint type you choose.

Finally, to finish your data streaming setup:

  1. Make sure the Active switch is turned on.
  2. Click the Save button.

Now, you’ll be able to analyze the behavior of the edge functions debugging process through the logs sent to your configured data streaming.

Variables definition

Variable Definition
$time Request date and time. Example: Oct. 31st, 2022 - 19:30:41
$global_id Settings identifier.
$edge_function_id Edge Function identifier.
$request_id Unique request identifier. Example: 5f222ae5938482c32a822dbf15e19f0f
$log_level Level of the log generator: ERROR, WARN, INFO, DEBUG, or TRACE.
$log_message Editable message used in the log function. Available for users to identify and report a given behavior.

Didn’t find what you were looking for? Open a support ticket.