opentelemetry-go-contrib icon indicating copy to clipboard operation
opentelemetry-go-contrib copied to clipboard

Support http.server.request_count metric in otelhttp.

Open jeremyje opened this issue 2 years ago • 1 comments

Fixes https://github.com/open-telemetry/opentelemetry-go-contrib/issues/2481

jeremyje avatar Jul 02 '22 07:07 jeremyje

Codecov Report

Merging #2482 (39190d8) into main (d1faf5c) will increase coverage by 0.0%. The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2482   +/-   ##
=====================================
  Coverage   74.3%   74.3%           
=====================================
  Files        144     144           
  Lines       6563    6568    +5     
=====================================
+ Hits        4877    4882    +5     
  Misses      1543    1543           
  Partials     143     143           
Impacted Files Coverage Δ
instrumentation/net/http/otelhttp/handler.go 81.5% <100.0%> (+0.5%) :arrow_up:

codecov[bot] avatar Jul 04 '22 11:07 codecov[bot]

Can this keep to be considered? I have no good way of getting the request count on my provider without this metric, which seems to be required by the spec.

RangelReale avatar Oct 04 '22 11:10 RangelReale

I ended up deleting this PR unintentionally because I purged all my repositories. My list got way too long. If there's still interest in getting this merged I can recreate this PR but there was some pushback so it was never merged.

https://github.com/open-telemetry/opentelemetry-go-contrib/pull/2482/files still fortunately shows the diff.

cc: @Aneurysm9 @RangelReale @hanyuancheung

jeremyje avatar Oct 04 '22 13:10 jeremyje

I'm not seeing this metric being required in the spec. https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/http-metrics.md

dmathieu avatar Oct 04 '22 13:10 dmathieu

I'm not seeing this metric being required in the spec. https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/http-metrics.md

Hmm you're right, I think I was confusing it with another thing. It isn't even mentioned there.

The only thing I'm afraid is adding it to my code, and in the future this being added to the library and it counting the request 2 times.

RangelReale avatar Oct 04 '22 14:10 RangelReale