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

[Instrumentation.Http] fall back in case of NET9. update unit tests #2314

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

TimothyMothra
Copy link
Contributor

Fixes #2029

Net9 added support for Http semantic convention attributes here: dotnet/runtime#104251

Changes

  • update Instrumentation.Http to not override tags set by NET9.
  • update unit tests

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, 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)

@TimothyMothra TimothyMothra requested a review from a team as a code owner November 12, 2024 01:18
@github-actions github-actions bot added infra Infra work - CI/CD, code coverage, linters comp:instrumentation.http Things related to OpenTelemetry.Instrumentation.Http labels Nov 12, 2024
global.json Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Project coverage is 68.24%. Comparing base (71655ce) to head (292c915).
Report is 600 commits behind head on main.

Files with missing lines Patch % Lines
...ementation/HttpHandlerMetricsDiagnosticListener.cs 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2314      +/-   ##
==========================================
- Coverage   73.91%   68.24%   -5.67%     
==========================================
  Files         267      363      +96     
  Lines        9615    13816    +4201     
==========================================
+ Hits         7107     9429    +2322     
- Misses       2508     4387    +1879     
Flag Coverage Δ
unittests-Instrumentation.Http 74.12% <84.61%> (?)

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

Files with missing lines Coverage Δ
...tp/Implementation/HttpHandlerDiagnosticListener.cs 72.22% <100.00%> (ø)
...ementation/HttpHandlerMetricsDiagnosticListener.cs 0.00% <0.00%> (ø)

... and 383 files with indirect coverage changes

@github-actions github-actions bot removed the infra Infra work - CI/CD, code coverage, linters label Nov 13, 2024
@TimothyMothra TimothyMothra marked this pull request as ready for review November 13, 2024 18:27
@github-actions github-actions bot added the infra Infra work - CI/CD, code coverage, linters label Nov 13, 2024
@@ -324,6 +324,7 @@ jobs:
with:
project-name: Component[OpenTelemetry.Instrumentation.Http]
code-cov-name: Instrumentation.Http
tfm-list: '[ "net462", "net8.0", "net9.0" ]'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to add NET9 to the CI. I'm checking offline to confirm if this is the correct way to make that change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After #2313 gets merged, net9.0 would run for all jobs by default. You won't need to configure for this individual job.

@rajkumar-rangaraj
Copy link
Contributor

@TimothyMothra As we discussed offline, please evaluate if we need to cover the .NET 9.0 gaps for url.full with URL fragment and http.request.method_original case sensitivity.

@TimothyMothra
Copy link
Contributor Author

I opened a tracking issue in Runtime: dotnet/runtime#109847

@github-actions github-actions bot removed the infra Infra work - CI/CD, code coverage, linters label Nov 14, 2024
Copy link
Member

@alanwest alanwest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks pretty good, but looks like there's some build issues.

@TimothyMothra
Copy link
Contributor Author

PR looks pretty good

Thanks!

but looks like there's some build issues.

Sigh. Visual Studio keeps saving files with Windows line endings (CR LF), but this repo expects Unix line endings (LF).
I haven't found a way to force Visual Studio to stop changing things. 🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:instrumentation.http Things related to OpenTelemetry.Instrumentation.Http
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[http] Update Trace Instrumentation to align with changes in .NET 9.0
5 participants