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