AddHttpClientInstrumentation considers the activity finished as soon as the headers are sent #4555
Unanswered
Vlad-Stryapko
asked this question in
Q&A
Replies: 2 comments 1 reply
-
The activity produced by HttpClient stops when the 1st byte is received I think, so the time to read the full response body is not included. Related: #3277 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@cijothomas |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was playing around with HTTP instrumentation and noticed it considers the activity finished when the headers are available even if the body itself cannot be read yet. Is this the expected behaviour and is it possible to make sure the activity covers the entire request or should I add custom telemetry on-top of HTTP instrumentation to achieve that?
The repro is pretty simple.
Client is .NET 6 console app with the following OTel packages.
Program.cs
Server is Core 6 web app with a default controller and a simple middleware.
Packages:
Middleware
When I start the console app, I notice it creates the activity as soon as headers are available. That is, as soon as
client.GetAsync
finishes.Here's how it looks in Jaeger
Beta Was this translation helpful? Give feedback.
All reactions