0

I have add a custom segment added to parent lambda segment so I can add annotations and metadata, the problem is that while I can mark that custom segment and their subsegments as errors, I have not found a way to mark the lambda function segment as an error.

As a consequence, visually in the XRay console, all is green (200) at lambda levels, despite that lambda is returning 4xx (I am using lambda proxy integration) making very difficult to debug errors when i have 100s of lambdas in production.

As a workaround, i was thinking to add the returned statusCode as an annotation to the custom segment, and so i can at least group/filter the invocations that are throwing errors. However, i am still having the limitation that the colors are not reflecting the real purpose.

Question - Any way to mark the lambda invocation with an error?

Thanks

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
user7124
  • 95
  • 7

1 Answers1

0

The Lambda segment will reflect a 500 fault if any exception is thrown from the function and Lambda active tracing is enabled. Unfortunately, the Lambda root segment is immutable. There is no way to manually modify its state.