-
Notifications
You must be signed in to change notification settings - Fork 496
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
otelhttp: Record metrics on timed out requests #4542
Comments
Would it be possible to include some additional context for someone who is looking to pick up a "good first issue"? Potentially a way to reproduce the bug/scenario? It appears we can likely copy (or generalize to share between the two) the // instrumentation/net/http/otelhttp/handler.go:232
ctxWithoutCancel := withoutCancel(ctx)
next.ServeHTTP(w, r.WithContext(ctxWithoutCancel)) But I'm not certain that's the requested fix 🤔... (likely bc most of this is very new to me 😁). |
I see two ways First one, to cancel using an HTTP Client. See: https://pkg.go.dev/net/http#Request.Context
Second one, to cancel through HTTP Server itself. See
The derived context created via opentelemetry-go-contrib/instrumentation/net/http/otelhttp/handler.go Lines 239 to 245 in 7469f61
Therefore, I would rather create a context using
|
I am new to go repo, I saw this is a "good first issue" so I came in.
Here are my questions
Thanks, |
This issue is good for repository "newcomers", but not for Go novices. |
@pellared , I mean go repo, not go itself |
Hi @pellared, I added a WIP PR to take a crack at this. Would it be good to assign this to me so there isn't duplicative effort? |
@pellared, I think this should be closed since we'll be handling this case lower level now? |
On an HTTP client implementation, I have a meter using the request context and I would like to keep track of HTTP timeouts, however, the metrics are ignored because of this timeout.
Originally posted by @ravanscafi in open-telemetry/opentelemetry-go#3618 (comment)
We should do something like here:
opentelemetry-go-contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
Lines 206 to 235 in fe68fe9
The text was updated successfully, but these errors were encountered: