-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for edge environments (Cloudflare Workers, Vercel Serverless, etc) #62
Comments
Hi @aroman, Thank you for the fork and for raising this. I appreciate it. Officially supporting serverless is definitely makes a lot of sense. The fork looks great. Thanks again for submitting it! |
Hi @curusarn, Any updates on this one? Best regards, |
Hi @magnuslundin, Supporting serverless is still something we want to do. Thanks for keeping in touch! Best, |
Hello @aroman, thanks for bringing up the serverless support 🙌 Just wanted to clarify. I've tested From the docs it seems that Cloudflare Workers run in their own I'll double-check, but if it's mainly for Cloudflare Worker support, I'd go with naming it |
@PetrHeinz yes, cloudflare workers and other "edge" runtimes are quite a bit different than the older "serverless" offerings like lamba.
hope this helps! |
Hello, @aroman, @Ehesp, @magnuslundin, I just released a new package @logtail/edge for logging in Edge runtime (tested in Cloudflare Worker). If you find any issue or inconsistency, feel free to open an issue or a PR 🙏 Thanks @aroman for sharing your fork and feedback 👍 |
Awesome will give it a go! |
Hey!
I saw y'all have been active on this repo lately, so wanted to make sure I raised this :)
tl;dr this library should offer support for using logtail in modern serverless environments like Cloudflare Workers.
I forked your node logger to do this, and have been using it in our product, you can see the changes here: master...magic-circle-studio:logtail-js-cfworker:master, and you can play with it on NPM here: @magiccircle/logtail-cfworker
Of course, it was just a quick and dirty have, and I don't really want to be maintaining a fork — but it does work nicely so far.
My suggestion is that you introduce a new package, like
node
orbrowser
, which is designed to run in serverless environments. You could perhaps call it "edge" or "workers". Then, I could use it like@logtail/edge
.As you can see, there isn't really anything new to add to support these environments — it's more a matter of slightly switching types and avoiding using node-specific libraries like
fs
.Let me know if you have any thoughts!
The text was updated successfully, but these errors were encountered: