Skip to content

http.server.duration metric description is wrong #2298

Closed
@deleteLater

Description

@deleteLater

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions