Replies: 1 comment
-
This post only mentioned the code runs in the same process https://learn.microsoft.com/en-us/dotnet/fundamentals/networking/telemetry/events#eventlistener, but somehow it also share the same AsyncContext after testing locally. Can someone share more details about how it works internally, I could not find any official documents that talk about it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
From my understanding, the EventListener callback such as OnEventWritten should be triggered in the same process as the http request but does not guarantee it runs in the same async context. Why does AsyncLocal work in this library that during event callbacks, it can do the checkpoints and logs the latency of the event based on the initial request sent timestamp in HttpLatencyTelemetryHandler? Upon checking the bottom of the code, I did not find where and how this is done in other places either.
Beta Was this translation helpful? Give feedback.
All reactions