Skip to content

Conversation

martincostello
Copy link
Member

Changes

Cherry-pick various changes from #2822 to prepare for .NET 10:

  • Fix incorrect version comment on CodeQL actions.
  • Explicitly disable use of pre-release .NET SDK versions.
  • Fix incorrect comment.
  • Make System.Text.Json package reference conditional to avoid explicit dependency when the package in "in-box".
  • Fix typo in test name.
  • Add support for a maximum version for routing test cases.
  • Allow the metric path for routing test cases to diverge from the activity path.

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)

Cherry-pick various changes from open-telemetry#2822:

- Fix incorrect version comment on CodeQL actions.
- Explicitly disable use of pre-release .NET SDK versions.
- Fix incorrect comment.
- Make System.Text.Json package reference conditional to avoid explicit dependency when the package in "in-box".
- Fix typo in test name.
- Add support for a maximum version for routing test cases.
- Allow the metric path for routing test cases to diverge from the activity path.
@github-actions github-actions bot added infra Infra work - CI/CD, code coverage, linters comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva comp:instrumentation.aspnetcore Things related to OpenTelemetry.Instrumentation.AspNetCore comp:instrumentation.http Things related to OpenTelemetry.Instrumentation.Http comp:instrumentation.sqlclient Things related to OpenTelemetry.Instrumentation.SqlClient labels Sep 10, 2025
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.78%. Comparing base (97ccae0) to head (f830454).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3100      +/-   ##
==========================================
+ Coverage   65.28%   69.78%   +4.50%     
==========================================
  Files         418      430      +12     
  Lines       15536    16617    +1081     
==========================================
+ Hits        10142    11596    +1454     
+ Misses       5394     5021     -373     
Flag Coverage Δ
unittests-Contrib.Shared.Tests 83.73% <ø> (-0.40%) ⬇️
unittests-Exporter.Geneva 53.33% <ø> (+8.33%) ⬆️
unittests-Exporter.InfluxDB 95.14% <ø> (+1.21%) ⬆️
unittests-Exporter.Instana 74.86% <ø> (ø)
unittests-Exporter.OneCollector 94.61% <ø> (-0.06%) ⬇️
unittests-Extensions 90.65% <ø> (-0.78%) ⬇️
unittests-Extensions.Enrichment 100.00% <ø> (ø)
unittests-Extensions.Enrichment.AspNetCore 94.11% <ø> (ø)
unittests-Instrumentation.AWS 83.80% <ø> (-1.22%) ⬇️
unittests-Instrumentation.AspNet 74.93% <ø> (ø)
unittests-Instrumentation.AspNetCore 70.76% <ø> (ø)
unittests-Instrumentation.Cassandra 23.52% <ø> (ø)
unittests-Instrumentation.ConfluentKafka 14.10% <ø> (-0.14%) ⬇️
unittests-Instrumentation.ElasticsearchClient 80.12% <ø> (ø)
unittests-Instrumentation.EntityFrameworkCore 80.80% <ø> (ø)
unittests-Instrumentation.EventCounters 76.36% <ø> (ø)
unittests-Instrumentation.GrpcCore 91.42% <ø> (ø)
unittests-Instrumentation.GrpcNetClient 79.61% <ø> (ø)
unittests-Instrumentation.Hangfire 84.61% <ø> (ø)
unittests-Instrumentation.Http 74.18% <ø> (+12.76%) ⬆️
unittests-Instrumentation.Owin 88.62% <ø> (ø)
unittests-Instrumentation.Process 100.00% <ø> (ø)
unittests-Instrumentation.Quartz 78.76% <ø> (ø)
unittests-Instrumentation.Runtime 100.00% <ø> (ø)
unittests-Instrumentation.ServiceFabricRemoting 34.54% <ø> (ø)
unittests-Instrumentation.SqlClient 87.29% <ø> (-2.23%) ⬇️
unittests-Instrumentation.StackExchangeRedis 70.31% <ø> (+2.82%) ⬆️
unittests-Instrumentation.Wcf 78.95% <ø> (+29.31%) ⬆️
unittests-OpAmp.Client 71.18% <ø> (+1.02%) ⬆️
unittests-PersistentStorage 65.88% <ø> (+1.00%) ⬆️
unittests-Resources.AWS 74.42% <ø> (+1.31%) ⬆️
unittests-Resources.Azure 85.31% <ø> (-0.51%) ⬇️
unittests-Resources.Container 67.34% <ø> (ø)
unittests-Resources.Gcp 71.42% <ø> (ø)
unittests-Resources.Host 73.91% <ø> (ø)
unittests-Resources.OperatingSystem 76.98% <ø> (+8.95%) ⬆️
unittests-Resources.Process 100.00% <ø> (ø)
unittests-Resources.ProcessRuntime 79.59% <ø> (-20.41%) ⬇️
unittests-Sampler.AWS 88.25% <ø> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 91 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martincostello martincostello marked this pull request as ready for review September 10, 2025 09:22
@Copilot Copilot AI review requested due to automatic review settings September 10, 2025 09:22
@martincostello martincostello requested a review from a team as a code owner September 10, 2025 09:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR prepares the codebase for .NET 10 compatibility by making several infrastructure improvements and fixes. The changes focus on conditional package references, test infrastructure enhancements, and correcting version comments in GitHub Actions.

  • Conditionally reference System.Text.Json to avoid conflicts when the package is "in-box"
  • Add support for maximum .NET version constraints in routing tests
  • Fix spelling errors in test method names and comments

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/OpenTelemetry.Instrumentation.SqlClient.Tests/OpenTelemetry.Instrumentation.SqlClient.Tests.csproj Added condition to System.Text.Json package reference
test/OpenTelemetry.Instrumentation.Http.Tests/OpenTelemetry.Instrumentation.Http.Tests.csproj Added condition to System.Text.Json package reference
test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestCase.cs Added MaximumDotnetVersion and ExpectedMetricRoute properties
test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTests.cs Fixed comment typo and added metric route divergence support
test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestCases.json Added maximum version constraint to test case
test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestCases.cs Implemented maximum version filtering logic
test/OpenTelemetry.Instrumentation.AspNetCore.Tests/BasicTests.cs Fixed spelling in test method name and activity tag
test/OpenTelemetry.Contrib.Shared.Tests/OpenTelemetry.Contrib.Shared.Tests.csproj Added condition to System.Text.Json package reference
src/OpenTelemetry.Exporter.Geneva/OpenTelemetry.Exporter.Geneva.csproj Fixed incorrect comment about target frameworks
global.json Disabled pre-release SDK versions
.github/workflows/ossf-scorecard.yml Updated CodeQL action version comment
.github/workflows/codeql-analysis.yml Updated CodeQL action version comments

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

it remove references to transitive dependencies. No more issues.
Copy link
Member

@Kielek Kielek left a comment

Choose a reason for hiding this comment

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

Some direct improvements pushed.
Minor changes related to referencing System.Text.Json

Candidate for separate task
Review usage of SystemTextJsonLatestNet6OutOfBandPkgVer, SystemTextJsonLatestNet8OutOfBandPkgVer and SystemTextJsonMinimumRequiredPkgVer

@martincostello
Copy link
Member Author

Candidate for separate task
Review usage of SystemTextJsonLatestNet6OutOfBandPkgVer, SystemTextJsonLatestNet8OutOfBandPkgVer and SystemTextJsonMinimumRequiredPkgVer

I think there's already some of this in #2822 because some new changes in the SDK make them redundant, but maybe not all the possible places.

martincostello and others added 2 commits September 10, 2025 11:21
Simplify condition for System.Text.Json reference.
@Kielek Kielek merged commit 21c68b8 into open-telemetry:main Sep 10, 2025
233 checks passed
@martincostello martincostello deleted the dotnet-10-prep branch September 10, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva comp:instrumentation.aspnetcore Things related to OpenTelemetry.Instrumentation.AspNetCore comp:instrumentation.http Things related to OpenTelemetry.Instrumentation.Http comp:instrumentation.sqlclient Things related to OpenTelemetry.Instrumentation.SqlClient infra Infra work - CI/CD, code coverage, linters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants