You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment each line is a separate event for each line (this is handled by the callee of the custom runtime who is piping stdout to cloudwatch logs).
The objective is to be able to push a single event e.g. console.log(1, '\n', 2)
^This is the node output.
It is expandable and copy/pastable (where it wouldn't be if it was across multiple events).
Since console.log can be overloaded the naive solution is to push each console.log to CW however the problem is that this is rate-limited:
There is a quota of 5 requests per second per log stream. Additional requests are throttled. This quota can't be changed.
What you want to do is queue the log events up and PutLogEvents every second. The problem is that if you POST the queue after each event you may hit the rate-limit (since each event can be < 50ms) BUT if you don't then the process after each event they may never be POSTed (if the process is terminated) https://github.com/hayd/deno-lambda#warning
Ideally custom runtimes will have a local endpoint which manages such a CW logs batch queue... but nothing is documented as far as I can see.
OR it's even simpler and the newline can be encoded somehow (and still passed to stdout).
cc @brianleroux (perhaps you know / or know someone how has an answer for this)!
The text was updated successfully, but these errors were encountered:
At the moment each line is a separate event for each line (this is handled by the callee of the custom runtime who is piping stdout to cloudwatch logs).
The objective is to be able to push a single event e.g.
console.log(1, '\n', 2)
^This is the node output.
It is expandable and copy/pastable (where it wouldn't be if it was across multiple events).
Since console.log can be overloaded the naive solution is to push each console.log to CW however the problem is that this is rate-limited:
What you want to do is queue the log events up and PutLogEvents every second. The problem is that if you POST the queue after each event you may hit the rate-limit (since each event can be < 50ms) BUT if you don't then the process after each event they may never be POSTed (if the process is terminated) https://github.com/hayd/deno-lambda#warning
Ideally custom runtimes will have a local endpoint which manages such a CW logs batch queue... but nothing is documented as far as I can see.
OR it's even simpler and the newline can be encoded somehow (and still passed to stdout).
cc @brianleroux (perhaps you know / or know someone how has an answer for this)!
The text was updated successfully, but these errors were encountered: