question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for serverless environments?

See original GitHub issue

Hello,

First of all, thank you to the segment team for providing this library.

I’m currently trying to implement analytics-node in my serverless app (GraphQL + nowsh, now known as vercel.

I tried using a shorter flushInterval like mentioned in this comment: https://github.com/segmentio/analytics-node/issues/121#issuecomment-382463201 but it looks like context.callbackWaitsForEmptyEventLoop needs to be set to true, however Vercel, under the hood, use context.callbackWaitsForEmptyEventLoop = false by default.

Is there any recommended guide to use this library in a serverless environment / is it supported?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jkarsrudcommented, Jun 21, 2021

But I was looking to have confirmation from someone else using lambda.

@pbassut If you are still looking at confirmation, I just tested this on my end and the fix seems to be working just fine 👍

2reactions
pbassutcommented, Jun 23, 2021

Yeah, sure. That’s good cause I’ve been testing on AWS Lambda and it seems to be working well too. But I was looking to have confirmation from someone else also using Lambda.

But we’ll make a release anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Serverless Computing – Amazon Web Services
Serverless applications start with AWS Lambda, an event-driven compute service natively integrated with over 200 AWS services and software as a service ......
Read more >
AWS Lambda Functions - Serverless Framework
The Serverless Framework documentation for AWS Lambda, API Gateway, EventBridge, DynamoDB and much more.
Read more >
What is serverless? - Red Hat
Serverless is a cloud-native development model that allows developers to build and run applications without having to manage servers.
Read more >
Serverless Architecture: What It Is & How It Works | Datadog
One of the most popular serverless architectures is Function as a Service (FaaS), where developers write their application code as a set of...
Read more >
What is Serverless Computing? - IBM
Today every leading cloud service provider offers a serverless platform including Amazon Web Services (AWS Lambda), Microsoft Azure (Azure Functions), ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found