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

Subsegment not emited after first lambda invocation #240

Open
jeremielec opened this issue Mar 31, 2022 · 6 comments
Open

Subsegment not emited after first lambda invocation #240

jeremielec opened this issue Mar 31, 2022 · 6 comments
Assignees

Comments

@jeremielec
Copy link

jeremielec commented Mar 31, 2022

I have an issue with the XRay SDK for .Net.

Context : Hosting an AspNet Core 6.0 Api within custom runtime. Lambda are invoked throught Api gateway.

Any subsequent segment created after the first invocation are just lost and not displayed therefore in XRay console.

Note that the EF Core interceptor are used for an SQL Server database. Query are visible on the first invocation, not the subsequent.

Attached log file.

=> On first invocation, Subsegment emit log are cleary visible.

=> On subsequent, no more log, and there are not visible at all in console

log.txt

Thank in advance for any help for troubleshooting that strange issue

@jon-armen
Copy link
Contributor

I do not believe the current EF Core Interceptor will work on dotnet6.0. I have several branches and plan to implement the fixes required once this library starts releasing more frequently and makes progress on the 3.x breaking changes release.

@srprash
Copy link
Collaborator

srprash commented Apr 11, 2022

@jon-armen could be right about EFCore Interceptor not functional with .Net6 but I suspect if that is the main root cause here since @jeremielec said none of the segments are displayed.

@jeremielec Can you provide screenshots of the trace with all the segments and subsegments present, and the one with issues? Also, within your Lambda function, are you generating additional segments or subsegments other than the one for SQL server db?

@jon-armen
Copy link
Contributor

@jeremielec , I'm also curious, are your calls to EF sync or async? Reviewing the changes for net6.0, sync may work fine. We would likely see a missing method exception for any async method as the return types changed from Task to ValueTask

@jeremielec
Copy link
Author

jeremielec commented Apr 20, 2022

@jon-armen All EfCore call are done in async patern.

How over there is no missing method exception at all, everything is just working fine.

@srprash No additional segment / subsegment are created.
Since this is an internal application, i have hidden sensitive data (on promise SQL server host, lambda name)

Xray trace valid :

image

XRay with missing data :

image

Api call has been done within 10 second interval with postman.

From lambda log stream, there is clear outgoing sql server request executed.

@srprash
Copy link
Collaborator

srprash commented Apr 24, 2022

Hey @jeremielec
Thanks for the screenshot. Looking at them I couldn't tell why there are no subsegments for the DB call. However, I noticed that there is a Database::SQL node from the AWS::Lambda::Function in the screenshot, which means that the request to database is being captured but not being shown. Probably a bug in the console rendering?
Screen Shot 2022-04-24 at 2 41 30 PM

Can you check the raw data for the trace and verify if the Database::SQL subsegments are present there? And if possible provide a snippet of it. Thanks.

@jeremielec
Copy link
Author

jeremielec commented Apr 25, 2022

@srprash Hello

No SQL data are visible at all on Raw Data tab. These one are visible on the (good ?) trace with full sql information.

Since no information to view, i cannot provided a snippet :/

How over regarding the display problem mentionned, there is a bug in XRay console after changing the XRay trace id, External node service are updated after a couple of second without any notification. Image of the problem are more relevant :

Notice that the screen was already loaded with a trace, i just change the trace id if the bottom. (This is in any case another problem than the one in this github issues)

Immediatly after copy paste the trace which has missing subsegment problem :

image

After a couple of second : (the screen blink when the "orphaned" node disappear)

image

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

3 participants