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

http.server.duration metric description is wrong #2298

Closed
deleteLater opened this issue Feb 26, 2024 · 5 comments · Fixed by #2326
Closed

http.server.duration metric description is wrong #2298

deleteLater opened this issue Feb 26, 2024 · 5 comments · Fixed by #2326
Labels
bug Something isn't working

Comments

@deleteLater
Copy link

The metric description for http.server.duration should be Measures the duration of inbound HTTP requests while we're using measures the duration of the inbound HTTP request.

This could cause an error like this (from my environment)

2024-02-21 14:00:05 2024-02-21T06:00:05.268Z    error   [email protected]/log.go:23    error gathering metrics: collected metric http_server_duration_milliseconds label:{name:"deployment_environment" value:"local"} label:{name:"http_flavor" value:"1.0"} label:{name:"http_host" value:"[127.0.0.1:10000](http://127.0.0.1:10000/)"} label:{name:"http_method" value:"POST"} label:{name:"http_scheme" value:"http"} label:{name:"http_server_name" value:"[0.0.0.0](http://0.0.0.0/)"} label:{name:"http_status_code" value:"200"} label:{name:"job" value:"featbit-das"} label:{name:"label1" value:"featbit"} label:{name:"net_host_port" value:"10000"} histogram:{sample_count:3 sample_sum:44 bucket:{cumulative_count:0 upper_bound:0} bucket:{cumulative_count:0 upper_bound:5} bucket:{cumulative_count:0 upper_bound:10} bucket:{cumulative_count:3 upper_bound:25} bucket:{cumulative_count:3 upper_bound:50} bucket:{cumulative_count:3 upper_bound:75} bucket:{cumulative_count:3 upper_bound:100} bucket:{cumulative_count:3 upper_bound:250} bucket:{cumulative_count:3 upper_bound:500} bucket:{cumulative_count:3 upper_bound:750} bucket:{cumulative_count:3 upper_bound:1000} bucket:{cumulative_count:3 upper_bound:2500} bucket:{cumulative_count:3 upper_bound:5000} bucket:{cumulative_count:3 upper_bound:7500} bucket:{cumulative_count:3 upper_bound:10000}} has help "measures the duration of the inbound HTTP request" but should have "Measures the duration of inbound HTTP requests."
2024-02-21 14:00:05     {"kind": "exporter", "data_type": "metrics", "name": "prometheus"}
2024-02-21 14:00:05 [github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter.(*promLogger).Println](http://github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter.(*promLogger).Println)
2024-02-21 14:00:05     [github.com/open-telemetry/opentelemetry-collector-contrib/exporter/[email protected]/log.go:23](http://github.com/open-telemetry/opentelemetry-collector-contrib/exporter/[email protected]/log.go:23)
2024-02-21 14:00:05 [github.com/prometheus/client_golang/prometheus/promhttp.HandlerForTransactional.func1](http://github.com/prometheus/client_golang/prometheus/promhttp.HandlerForTransactional.func1)
2024-02-21 14:00:05     [github.com/prometheus/[email protected]/prometheus/promhttp/http.go:144](http://github.com/prometheus/[email protected]/prometheus/promhttp/http.go:144)
2024-02-21 14:00:05 net/http.HandlerFunc.ServeHTTP
2024-02-21 14:00:05     net/http/server.go:2136
2024-02-21 14:00:05 net/http.(*ServeMux).ServeHTTP
2024-02-21 14:00:05     net/http/server.go:2514
2024-02-21 14:00:05 [go.opentelemetry.io/collector/config/confighttp.(*decompressor).ServeHTTP](http://go.opentelemetry.io/collector/config/confighttp.(*decompressor).ServeHTTP)
2024-02-21 14:00:05     [go.opentelemetry.io/collector/config/[email protected]/compression.go:147](http://go.opentelemetry.io/collector/config/[email protected]/compression.go:147)
2024-02-21 14:00:05 [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*middleware).serveHTTP](http://go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*middleware).serveHTTP)
2024-02-21 14:00:05     [go.opentelemetry.io/contrib/instrumentation/net/http/[email protected]/handler.go:225](http://go.opentelemetry.io/contrib/instrumentation/net/http/[email protected]/handler.go:225)
2024-02-21 14:00:05 [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.NewMiddleware.func1.1](http://go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.NewMiddleware.func1.1)
2024-02-21 14:00:05     [go.opentelemetry.io/contrib/instrumentation/net/http/[email protected]/handler.go:83](http://go.opentelemetry.io/contrib/instrumentation/net/http/[email protected]/handler.go:83)
2024-02-21 14:00:05 net/http.HandlerFunc.ServeHTTP
2024-02-21 14:00:05     net/http/server.go:2136
2024-02-21 14:00:05 [go.opentelemetry.io/collector/config/confighttp.(*clientInfoHandler).ServeHTTP](http://go.opentelemetry.io/collector/config/confighttp.(*clientInfoHandler).ServeHTTP)
2024-02-21 14:00:05     [go.opentelemetry.io/collector/config/[email protected]/clientinfohandler.go:28](http://go.opentelemetry.io/collector/config/[email protected]/clientinfohandler.go:28)
2024-02-21 14:00:05 net/http.serverHandler.ServeHTTP
2024-02-21 14:00:05     net/http/server.go:2938
2024-02-21 14:00:05 net/http.(*conn).serve
2024-02-21 14:00:05     net/http/server.go:2009
@deleteLater deleteLater added the bug Something isn't working label Feb 26, 2024
@Rodrigo-Novas
Copy link
Contributor

Rodrigo-Novas commented Feb 28, 2024

That's true, I found that message in these files. I'm going to make a PR about this, I hope they approve it

Captura de pantalla 2024-02-28 a la(s) 17 00 53

@KyriosGN0
Copy link

Hey, this was reintroduced in 0.46b0.

@emdneto
Copy link
Member

emdneto commented Jul 30, 2024

@KyriosGN0 could you please raise an issue pointing out the error you are having?

@KyriosGN0
Copy link

KyriosGN0 commented Jul 30, 2024

@emdneto, i have Otel collector deployed in k8s which are running into the errors listed in this issue , what details should i provide ?

@emdneto
Copy link
Member

emdneto commented Jul 30, 2024

@KyriosGN0 please go to https://github.com/open-telemetry/opentelemetry-python-contrib/issues/new/choose and create a "Bug report" . You'll have a form to fill with all details needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants