Comments (13)
Hi, @StampixSMO, we are likely issuing a further hardening, see #433. What Dori linked you is likely going to help, and we keep working to make sure we are getting this bug nailed down for good :-)
from lumigo-node.
Hey, @builtbylane Thanks for reporting, we are checking the issue
from lumigo-node.
Hey, @Nxtra, we are still investigating the root cause and the impact. In the meantime, we released a hotfix in the tracer. We see these errors in the eu-west-1
AWS region for a yet-unknown reason.
Attaching a link to the fix:
I will update here ASAP when we release a full fix, which also taking care of @builtbylane good comments
from lumigo-node.
This fix will get us back up, however this code on a whole does not feel production-grade:
- inconsistent patterns for catching errors make it hard to reason with
- Unhandled errors that would end up blowing up the entire lambda
- lots of typescript ignores that could easily lead to runtime issues
- object mutations should not be allowed. Should consider enforcing strict object immutability to prevent unintended mutations
Ultimately, it's the 2nd issue that concerns me the most. There's too many ways in which unexpected data from AWS would not be handled gracefully and end up blowing up our lambda again.
from lumigo-node.
@doriaviram , thanks! Patching it now.
Extra info:
Rolling back to aws-sdk 2.1301 as I first thought did not resolve it.
Only saw it on our dev accounts were we had recently deployed new function versions.
No impact on our test and prod account which were untouched.
from lumigo-node.
@builtbylane Yep, we are going to refactor this part, be sure about that
from lumigo-node.
Without a full refactor, this would make the code safer.
if (traceIdArr.length < 3) {
throw new Error('Expected at least 3 semi-colon separated parts in _X_AMZN_TRACE_ID.');
}
from lumigo-node.
this is a redacted but real _X_AMZN_TRACE_ID that breaks lumigo: Root=1-640f97b4-12345;Parent=1234;Sampled=0;Lineage=1234:0
as a first step, the code should not strictly be looking for exactly 3 parts.
As a followup, there are too many areas where an unexpectedly formed traceId could blow up a lambda. For instance, what if the Root had fewer than 2 hyphens? Is there a reason an error like that should block the execution of a lambda?
from lumigo-node.
@builtbylane , does this break all currently deployed lambdas that are wrapped with the lumigo tracer?
from lumigo-node.
FWIW, I have multiple environments live and the once using "aws-sdk": "2.1301.0" are still executing fine.
Where I upgraded to "aws-sdk": "2.1333.0" I encounter the error above.
from lumigo-node.
This started breaking all our production lambdas all of a sudden that have the tracer enabled ...
stack.0 | Error: Expected 3 semi-colon separated parts in _X_AMZN_TRACE_ID.
-- | --
stack.1 | at Object.getTraceId (/opt/nodejs/node_modules/@lumigo/tracer/dist/utils.js:76:15)
stack.2 | at Object.getSpanInfo (/opt/nodejs/node_modules/@lumigo/tracer/dist/spans/awsSpan.js:35:27)
stack.3 | at Object.getCurrentTransactionId (/opt/nodejs/node_modules/@lumigo/tracer/dist/spans/awsSpan.js:40:20)
stack.4 | at Object.getFunctionSpan (/opt/nodejs/node_modules/@lumigo/tracer/dist/spans/awsSpan.js:90:33)
stack.5 | at /opt/nodejs/node_modules/@lumigo/tracer/dist/tracer.js:298:50
stack.6 | at step (/opt/nodejs/node_modules/@lumigo/tracer/dist/tracer.js:33:23)
stack.7 | at Object.next (/opt/nodejs/node_modules/@lumigo/tracer/dist/tracer.js:14:53)
stack.8 | at /opt/nodejs/node_modules/@lumigo/tracer/dist/tracer.js:8:71
stack.9 | at new Promise (<anonymous>)
stack.10 | at __awaiter (/opt/nodejs/node_modules/@lumigo/tracer/dist/tracer.js:4:12)
stack.11 | at /opt/nodejs/node_modules/@lumigo/tracer/dist/tracer.js:263:61
stack.12 | at Runtime.handler (/opt/nodejs/node_modules/lumigo-auto-instrument/index.js:42:35)
stack.13 | at Runtime.handleOnceNonStreaming (/var/runtime/Runtime.js:74:25)
from lumigo-node.
Hey @StampixSMO can you update to:
https://github.com/lumigo-io/lumigo-node/releases/tag/v1.80.1
from lumigo-node.
The issue was fixed on the PR #432, and another refactor we did to improve the handling of _X_AMZN_TRACE_ID
is #433 that closing this issue.
From version 1.80.1
, the issue was fixed.
Thanks for reporting @builtbylane @StampixSMO @Nxtra
from lumigo-node.
Related Issues (18)
- No Host header for APIs that call https.request(URL) HOT 1
- Neo4j Tracer support HOT 3
- Test
- Test issue
- Test Issue
- TEST
- Not handling event['requestContext'] is undefined
- Add PR template HOT 2
- Adding build.yml to run tests in GitHub Actions HOT 1
- Integrate in TypeScript Project HOT 2
- "exports is not defined in ES module scope" HOT 7
- Please Add Support for NodeJS 16 HOT 3
- Execution tags globals list not cleared unless tracing HOT 10
- Require Function Warning During Webpack Build
- EMFILE: too many files open HOT 3
- Security vulnerabilities in axios 0.24.0 HOT 1
- -
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lumigo-node.