Is there any way to split/clone the stream in a way that wouldn't affect the response to the client?
Is there any way to split/clone the stream in a way that wouldn't affect the response to the client?
response object received by the tail worker only contains the status. I would really like to add latency and maybe even payload size to the access log. is there any way to get a hold of that data? especially latency is a very important metric that must be loggeduse env.[namespace_name].put(...)ReferenceError: env is not definedenv is not a global variable - you likely have to pass it into your function as an argument. In the workers example code you have request, env, ctx as arguments for the fetch handler:WNAM, so the worker should be placed there too, but it is placed locally instead. I guess that's a beta product issue (smart placement)... but just FYI.


export default {
// The fetch handler is invoked when this worker receives a HTTP(S) request
// and should return a Response (optionally wrapped in a Promise)
async fetch(request, env, ctx) {
//...
yourFunction(env);
}
}