Skip to content

Collect gRPC info: search for Microsoft.AspNetCore.Hosting.HttpRequestIn Activity#1

Closed
gregkalapos wants to merge 2 commits intorusscam:fix/activity-reusefrom
gregkalapos:FixGrpcTest
Closed

Collect gRPC info: search for Microsoft.AspNetCore.Hosting.HttpRequestIn Activity#1
gregkalapos wants to merge 2 commits intorusscam:fix/activity-reusefrom
gregkalapos:FixGrpcTest

Conversation

@gregkalapos
Copy link
Copy Markdown

@gregkalapos gregkalapos commented Mar 21, 2021

Follow up from elastic#1228

I looked into the failing gRPC tests.

gRPC info is stored on an Activity called Microsoft.AspNetCore.Hosting.HttpRequestIn. Prior to elastic#1228 we always created an Activity and Microsoft.AspNetCore.Hosting.HttpRequestIn was always its parent (although I think this assumption was already way too optimistic). Now with elastic#1228 the agent either creates and Activity or reuses an existing one.

Therefore this PR always searches up the Activity chain up to Microsoft.AspNetCore.Hosting.HttpRequestIn to read the Tags on it which contains the gRPC info that we collect instead of hard-coding Activity.Current.Parent and reads its tags.

@gregkalapos
Copy link
Copy Markdown
Author

I naively though this will run on CI - of course it doesn't. I opened elastic#1235 to run all tests in CI to make sure everything is green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant