SakuraFC
CDCloudflare Developers
•Created by SakuraFC on 2/20/2025 in #workers-help
Worker Logging, Bytes Sent
I am trying to troubleshoot a worker and need to know how many bytes was sent for each request, especially when the request is canceled by the client. I am trying to implement some debugging g logging in hono middleware, and cannot find a way to either get the info from Cloudflare, or make some sort of “proxy” stream to capture bytes read before client disconnects. I tried going with TransformStream as intermediary, but get “Body has already been used. It can only be used once. Use tee() first if you need to read it twice.” exception. Any advice how to know per request bytes sent in hono worker?
1 replies