logtail / logtail-js

Better Stack JavaScript client
https://betterstack.com/logs
ISC License
52 stars 12 forks source link

Using @logtail/edge causes huge increase in GB-s footprint on cloudflare #117

Open abhishiv opened 1 month ago

abhishiv commented 1 month ago

Hello, I'm using @logtail/edge in a cloudflare pages application with _worker.js. The web server is hono.

I recently added @logtail/edge to my app and my usage increased from around 60 GB-s to 2.3k GB-s

Screenshot 2024-07-23 at 12 51 15

For now I have removed logging and will update the thread with how the usage looks post removal.

abhishiv commented 1 month ago

Update: the issue is gone after removing logtail.

FYKI The increase is around 6x which IMHO make logtail unusable in production on cloudflare.

Screenshot 2024-07-24 at 20 29 14
versecafe commented 1 month ago

It's likely depending on your region the huge increase in usage is just awaiting the response from the server to confirm the logs have been written, is there anyway for you to check what percent of the runtime is spent idling? it might be that serverless logging could use a rework to just pop off log requests without batching and never await them as the loss of a few logs due to network issues is less important then the massive increase in cost