Don't truncate the output of console.log to 256 characters in persisted action logs

When viewing the result of executing a custom action in your logs, the output of any console.log statements is captured in the log data, which is very useful. What is less useful is that this output is truncated to a maximum of 256 characters. I understand the need to impose some sensible limit on the size of the data to protect your systems and avoid unnecessary storage and bandwidth costs, but I’d argue that 256 characters is an unreasonably low limit for the totality of output from a custom user script, given that it is the only means by which it is possible to glean any insight into what your script is actually doing in the real world (i.e. when users directly interact with Auth0 rather than sending mocked data to the script).

I propose the length limit should be increased significantly, perhaps to 4KB (4096 chars) or somewhere around that. This would discourage developers from chucking arbitrarily long strings of data into the log and clogging your systems, but still make it possible to capture stack traces for errors and record a narrative about the outcome of a longer action script without worrying about hitting the size limit.

  "action_name": "My action name",
  "response": {
    "logs": "The maximum length of this string is 256 chars",
    "stats": {
      "total_request_duration_ms": 414,
      "total_runtime_execution_duration_ms": 411,
      "runtime_processing_duration_ms": 4,
      "action_duration_ms": 345,
      "runtime_external_call_duration_ms": 62,
      "boot_duration_ms": 66,
      "network_duration_ms": 3
  "started_at": "2022-04-28T11:07:08.986801291Z",
  "ended_at": "2022-04-28T11:07:09.402169426Z"

Actions are very useful, but debugging with mocked data only gets you so far. This logging data is extremely helpful for diagnosing issues in your script but also for creating an audit trail that can be persisted long term via custom log streams. It’s usefulness however is currently hampered by the restrictive limit on the maximum length of the log data.

Hey there!

Thanks for creating this feedback card as well as the other one. Hope it gets some traction from other community members!