iopipe / iopipe-js-core

Observe and develop serverless apps with confidence on AWS Lambda with Tracing, Metrics, Profiling, Monitoring, and more.
https://www.iopipe.com/
Apache License 2.0
124 stars 20 forks source link

SAM local invocations are registering as separate functions because of account id #183

Closed pselle closed 6 years ago

pselle commented 6 years ago

IOpipe believes it is seeing new functions (resulting in lots of unique functions on the IOpipe dash) when invoking using SAM local, because in each invoke SAM local is changing the AWS account ID in the ARN. Somewhat annoying, so could possibly try to detect SAM local and prevent this from happening in IOpipe data.

coreylight commented 6 years ago

This may help identify and drop local invocations (if that's what we want to do) https://github.com/awslabs/aws-sam-local#identifying-local-execution-from-lambda-function-code

pselle commented 6 years ago

In the Python Agent, we now patch the ARN when it's a SAM local invocation: https://github.com/iopipe/iopipe-python/pull/147/files#diff-38981888783aacd3dc3fc835e68dfc47R98. This could be done for the JS agent.