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

Bug: http/2.0 requests tagged as http.flavor 1.1 (instrumentation/net/http/otelhttp) #3185

Closed
ldemailly opened this issue Jan 26, 2023 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed instrumentation: otelhttp

Comments

@ldemailly
Copy link

Making an http2.0 connection using net/http default transport (negotiating h2 over tls through ForceAttemptHTTP2: true) wrapped by otelhttp.NewTransport generates a trace/span with the wrong flavor: 1.1 instead of 2

Screen Shot 2023-01-26 at 11 03 29 AM

HTTP GET
Tags
http.flavor	1.1
http.host	 debug.fortio.org
http.method	GET
http.scheme	http
http.status_code	200
http.url	https://debug.fortio.org
internal.span.format	proto
otel.library.name	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
otel.library.version	semver:0.37.0
span.kind	client
Process 
telemetry.sdk.language	go
telemetry.sdk.name	opentelemetry
telemetry.sdk.version	1.11.2

code: https://github.com/fortio/fortiotel/blob/main/simple/otel_httptrace_simple.go

output

2023/01/26 10:53:31 OTEL export pipeline setup successfully - making a single request to -url https://debug.fortio.org
2023/01/26 10:53:32 Response for "https://debug.fortio.org": 200 OK
2023/01/26 10:53:32 Φορτίο version 1.40.0 h1:jSDO/jGcyC/qTpMZZ84EZbn9BQawsWM9/RMQ9s6Cn3w= go1.19.5 arm64 linux (in fortio.org/proxy 1.6.1) echo debug server up for 13h0m11.1s - request from 216.194.105.121:28096 https TLS_AES_128_GCM_SHA256

GET / HTTP/2.0

headers:

Host: debug.fortio.org
Accept-Encoding: gzip
Traceparent: 00-fa939e35d51ce76cb7064f77867ee33c-d67f1ef81823588e-01
User-Agent: Go-http-client/2.0

body:



2023/01/26 10:53:32 OTEL export pipeline shut down successfully

(as you can see it did make an h2 call, the debug endpoint echoes back everything and there is no proxy in between the client and that server)

@Sovietaced
Copy link
Contributor

I think this issue may be obsolete since protocol name/version are no longer recorded attributes.

@dmathieu
Copy link
Member

dmathieu commented Jan 8, 2024

You are right, thank you. The HTTP flavor is not a recorded attribute since the upgrade to semconv 1.20.0.
See #4320.

The comments in otelhttp's semconvutil are still referencing it though. #4799 fixes that.

@dmathieu dmathieu closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed instrumentation: otelhttp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants