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
The metric description for
http.server.durationshould beMeasures the duration of inbound HTTP requestswhile we're usingmeasures the duration of the inbound HTTP request.This could cause an error like this (from my environment)