dantheman
Deno.serve: Is it possible to flush a streaming response?
Ah! It looks like Deno Deploy's default compression buffers output into chunks. I got the expected continuous output in Chrome after adding this response header:
Cache-Control: no-transform
Hope this helps 🙂5 replies
Deno.serve: Is it possible to flush a streaming response?
I find that Deno will flush the response continuously, as you give data to the response stream. And for emitting a streaming response I sometimes find it easier to yield chunks from an async generator function, here's a basic example: https://dash.deno.com/playground/sour-bobcat-21
5 replies
OpenTelemetry instrumentation
I did a partial rebuild of opentelemetry-js to Deno, maybe it is helpful. I've been using it for the past year with personal and workplace scripts, incl. Deno Deploy.
I also supply Deno-specific instrumentations (http serving, fetch, KV, etc) and some async function wrappers to instrument business logic. I suspect that instrumentation packages from NPM wouldn't want to transmit to this ported version, maybe an importmap could help.
Repo: https://github.com/cloudydeno/deno-observability
4 replies
Investigating memory leak after adding new app dependency
I'm trying to get a minimal repro of my issue put together now and it seems like some irresponsible Response cloning here: https://github.com/open-telemetry/opentelemetry-js/blob/0c37daa0b1fe59a04810514ab4f995070ed84825/experimental/packages/opentelemetry-instrumentation-fetch/src/fetch.ts#L342-L344
I don't see anything cancelling the body of
resClone4Hook
10 replies