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

HttpSemanticConventions - new metric in HttpClient Instrumentation #4891

Closed
wants to merge 13 commits into from
Closed

HttpSemanticConventions - new metric in HttpClient Instrumentation #4891

wants to merge 13 commits into from

Conversation

TimothyMothra
Copy link
Contributor

@TimothyMothra TimothyMothra commented Sep 26, 2023

Towards #4484

This PR adds the new http.client.request.duration metrics in the HttpClient Instrumentation library.

Changes

  • all the following changes are made behind the environment variable OTEL_SEMCONV_STABILITY_OPT_IN
  • update Instrumentation.Http class HttpHandlerMetricsDiagnosticListener to emit new metric.
  • Test changes
    • HttpClientTests renamed to HttpClientTests.Old. new classes HttpClientTests.New and HttpClientTests.Dupe.
      This covers all options of the environment variable.
    • http-out-test-cases.json renamed to http-out-test-cases_Old.json. new files http-out-test-cases_New.jsonandhttp-out-test-cases_Dupe.json`
      These files hold all test cases for the previous test classes.
    • HttpClientTests.Basic was updated to accommodate 3 json files.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #4891 (236485f) into main (0b2d036) will increase coverage by 0.39%.
Report is 6 commits behind head on main.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4891      +/-   ##
==========================================
+ Coverage   82.88%   83.27%   +0.39%     
==========================================
  Files         294      294              
  Lines       12200    12211      +11     
==========================================
+ Hits        10112    10169      +57     
+ Misses       2088     2042      -46     
Flag Coverage Δ
unittests 83.27% <100.00%> (+0.39%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ementation/HttpHandlerMetricsDiagnosticListener.cs 97.50% <100.00%> (+20.35%) ⬆️

... and 10 files with indirect coverage changes

@TimothyMothra TimothyMothra changed the title [WIP] HttpSemanticConventions - new metric in HttpClient Instrumentation HttpSemanticConventions - new metric in HttpClient Instrumentation Sep 28, 2023
@TimothyMothra TimothyMothra marked this pull request as ready for review September 28, 2023 18:02
@TimothyMothra TimothyMothra requested a review from a team September 28, 2023 18:02
@CodeBlanch
Copy link
Member

@TimothyMothra I think there's too much duplication of code going on in these tests. I tried to clean it up on #4870. Can you help me get that PR reviewed & merged and then can we apply this on top of that?

@TimothyMothra
Copy link
Contributor Author

@TimothyMothra I think there's too much duplication of code going on in these tests. I tried to clean it up on #4870. Can you help me get that PR reviewed & merged and then can we apply this on top of that?

I'll take a look at the other PR today. I was about to pull some of the test changes out of THIS PR and create a smaller test refactor PR. I'll review your changes before I go down this path :)

@TimothyMothra TimothyMothra marked this pull request as draft September 28, 2023 22:23
@TimothyMothra
Copy link
Contributor Author

Converting this to Draft. I think #4870 is going to merge first. If there are too many merge conflicts, it might easier to recreate this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants