Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X-Ray incorrectly reports status for requests ending in server faults as 200 OK #283

Open
seekingtheoptimal opened this issue Jan 24, 2023 · 2 comments

Comments

@seekingtheoptimal
Copy link

Similar to this one, but no AWS Lambda involved, the .net core app is running in EBS environment.

image

This is a critical bug for ages now.
A reproducible test case or series of steps:

  • have any request in a .net core web api end with some internal error 5xx, and in X-Ray seems like all is fine with 200 Ok responses.

AWSXrayRecorder SDK version 2.10.1
.net version 5.0

@jj22ee
Copy link
Contributor

jj22ee commented Feb 2, 2023

Hi @seekingtheoptimal,
Can you try upgrading the SDK to the latest version (2.13.0) and see if this fixes the issue?

Otherwise, can you provide the raw trace data of this problematic segment? It may help us pinpoint the location of this possible instrumentation issue.

@jj22ee
Copy link
Contributor

jj22ee commented Feb 14, 2023

@seekingtheoptimal can you show how you are instrumenting WebAPI-prod? Are you manually creating Segments and attaching the exception to the Segment, or are you using the app.UseXRay() middleware for server instrumentation?

If you are using app.UseXRay(), can you confirm if this is used before all other middleware? Can you also make sure that you are correctly following the instructions (1) and (2) in the ASP.NET Core Framework (.NET Core) section of the README? They may be related to the status code issue and I want to make sure to eliminate all possible sources of error.

  • The status code showing 200 occurred in the past when using .Net Core 2.0 due to a known limitation of the ExceptionHandler middleware. As you are using .net Version 5.0, this issue could be related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants