Git Product home page Git Product logo

Comments (13)

mmanciop avatar mmanciop commented on May 24, 2024 2

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.

doriaviram avatar doriaviram commented on May 24, 2024 1

Hey, @builtbylane Thanks for reporting, we are checking the issue

from lumigo-node.

doriaviram avatar doriaviram commented on May 24, 2024 1

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.

builtbylane avatar builtbylane commented on May 24, 2024 1

This fix will get us back up, however this code on a whole does not feel production-grade:

  1. inconsistent patterns for catching errors make it hard to reason with
  2. Unhandled errors that would end up blowing up the entire lambda
  3. lots of typescript ignores that could easily lead to runtime issues
  4. 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.

Nxtra avatar Nxtra commented on May 24, 2024 1

@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.

doriaviram avatar doriaviram commented on May 24, 2024 1

@builtbylane Yep, we are going to refactor this part, be sure about that

from lumigo-node.

builtbylane avatar builtbylane commented on May 24, 2024

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.

builtbylane avatar builtbylane commented on May 24, 2024

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.

Nxtra avatar Nxtra commented on May 24, 2024

@builtbylane , does this break all currently deployed lambdas that are wrapped with the lumigo tracer?

from lumigo-node.

Nxtra avatar Nxtra commented on May 24, 2024

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.

StampixSMO avatar StampixSMO commented on May 24, 2024

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.

doriaviram avatar doriaviram commented on May 24, 2024

Hey @StampixSMO can you update to:
https://github.com/lumigo-io/lumigo-node/releases/tag/v1.80.1

from lumigo-node.

doriaviram avatar doriaviram commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.