MindscapeHQ / raygun4node

Node.JS SDK for Raygun
https://raygun.com
MIT License
31 stars 29 forks source link

APM for AWS Lambda? #318

Open paul-uz opened 2 days ago

paul-uz commented 2 days ago

Looking at the docs, to use APM, an agent is required, which is not possible when using AWS Lambda.

We have Xray tracing, but at a cost. If we want to use Raygun APM, we can't from the looks of it.

Does this package provide any APM functionality?

Any way APM can be implemented for Lambda?

sumitramanga commented 2 days ago

Hi @paul-uz

Thank you for your request!

I've passed this over to our rostered support team for consideration and investigation.

They'll let you know of their findings.

Cheers, Sumitra

PanosNB commented 2 days ago

Hello Paul,

It is theoretically feasible but we have not tried it ourselves nor do we have ready-made aws-lambda docker images.

First off, that would only work for C#, Ruby and Node.js, the three languages we support APM.

Next, if you need this for Node.js or Ruby, you can put the agent on a separate virtualized OS because for these two, you can modify the APM agent's url and port that the profiler sends data to. If it is C# though, the APM Agent needs to be in the same OS as the profiled application.

So, if C#, you will need to set up a docker container image that is compatible with AWS lambda, and install both the APM agent and your C# application on it.

If Ruby or Node.js, you can set up the agent on an AWS lambda or an EC2 instance, create a VPC that they can see each other, and add your Node/Ruby apps with the Raygun profiler on their own lambda.

I have fiddled around with all these, so do reach out if you decide to undertake this project and I'll help you out as well! Also, if you do get this running, it might be a good opportunity for us to do a joint tech write-up!

Let me know what you think

Dr. Panos Patros, CPEng VPEng at Raygun

paul-uz commented 1 day ago

Thanks for the reply @PanosNB !

In my case, I am only concerned with AWS Lambda. I'm curious to understand how the agent would run on AWS Lambda? Would it be a custom runtime?