Skip to content

Conversation

@martincostello
Copy link
Member

@martincostello martincostello commented Jun 9, 2025

Changes

Add support for building and testing with .NET 10 using .NET 10 RC2.

Also resolves #2459 as the .NET 10 SDK has new features that allows System.Text.Json to be detected as a shipping part of the parent application so we can remove the reference and allow the application to bring its own version with it.

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)

@github-actions github-actions bot added infra Infra work - CI/CD, code coverage, linters comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva comp:exporter.stackdriver Things related to OpenTelemetry.Exporter.Stackdriver comp:instrumentation.aspnetcore Things related to OpenTelemetry.Instrumentation.AspNetCore comp:instrumentation.cassandra Things related to OpenTelemetry.Instrumentation.Cassandra comp:instrumentation.confluentkafka Things related to OpenTelemetry.Instrumentation.ConfluentKafka comp:instrumentation.http Things related to OpenTelemetry.Instrumentation.Http comp:instrumentation.sqlclient Things related to OpenTelemetry.Instrumentation.SqlClient comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis labels Jun 9, 2025
@github-actions github-actions bot added comp:instrumentation.wcf Things related to OpenTelemetry.Instrumentation.Wcf comp:resources.processruntime Things related to OpenTelemetry.Resources.ProcessRuntime labels Jun 9, 2025
@codecov
Copy link

codecov bot commented Jun 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.73%. Comparing base (e666d6a) to head (3bdb09d).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2822      +/-   ##
==========================================
- Coverage   70.82%   70.73%   -0.09%     
==========================================
  Files         440      440              
  Lines       17261    17262       +1     
==========================================
- Hits        12225    12211      -14     
- Misses       5036     5051      +15     
Flag Coverage Δ
unittests-Contrib.Shared.Tests 86.54% <ø> (ø)
unittests-Exporter.Geneva 53.64% <ø> (-0.33%) ⬇️
unittests-Exporter.InfluxDB 95.14% <ø> (ø)
unittests-Exporter.Instana 74.86% <ø> (ø)
unittests-Exporter.OneCollector 94.61% <ø> (ø)
unittests-Extensions 90.65% <ø> (ø)
unittests-Extensions.Enrichment 100.00% <ø> (ø)
unittests-Extensions.Enrichment.AspNetCore 86.27% <ø> (ø)
unittests-Extensions.Enrichment.Http 94.33% <ø> (ø)
unittests-Instrumentation.AWS 83.80% <ø> (ø)
unittests-Instrumentation.AspNet 77.92% <ø> (-0.23%) ⬇️
unittests-Instrumentation.AspNetCore 71.69% <ø> (+0.92%) ⬆️
unittests-Instrumentation.Cassandra 23.52% <ø> (ø)
unittests-Instrumentation.ConfluentKafka 14.10% <ø> (ø)
unittests-Instrumentation.ElasticsearchClient 80.12% <ø> (ø)
unittests-Instrumentation.EntityFrameworkCore 80.80% <ø> (ø)
unittests-Instrumentation.EventCounters 77.27% <ø> (ø)
unittests-Instrumentation.GrpcCore 91.42% <ø> (ø)
unittests-Instrumentation.GrpcNetClient 79.61% <ø> (ø)
unittests-Instrumentation.Hangfire 84.61% <ø> (ø)
unittests-Instrumentation.Http 74.22% <100.00%> (+0.03%) ⬆️
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% <ø> (ø)
unittests-Instrumentation.StackExchangeRedis 71.80% <ø> (ø)
unittests-Instrumentation.Wcf 79.68% <ø> (ø)
unittests-OpAmp.Client 71.55% <ø> (ø)
unittests-PersistentStorage 74.91% <ø> (ø)
unittests-Resources.AWS 74.42% <ø> (ø)
unittests-Resources.Azure 85.31% <ø> (ø)
unittests-Resources.Container 67.34% <ø> (ø)
unittests-Resources.Gcp 71.42% <ø> (ø)
unittests-Resources.Host 71.85% <ø> (ø)
unittests-Resources.OperatingSystem 76.98% <ø> (ø)
unittests-Resources.Process 100.00% <ø> (ø)
unittests-Resources.ProcessRuntime 79.59% <ø> (ø)
unittests-Sampler.AWS 93.23% <ø> (ø)

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

Files with missing lines Coverage Δ
...tp/Implementation/HttpHandlerDiagnosticListener.cs 73.17% <100.00%> (+0.21%) ⬆️

... and 3 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
Copy link
Member Author

martincostello commented Jun 9, 2025

Need to investigate macOS test failure with .NET 10. I don't have a Macbook so might be tricky:

[xUnit.net 00:00:00.10]   Finished:    OpenTelemetry.Resources.OperatingSystem.Tests
  Failed OpenTelemetry.Resources.OperatingSystem.Test.OperatingSystemDetectorTests.TestOperatingSystemAttributes [7 ms]
  Error Message:
Test Run Failed.
   Assert.Contains() Failure: Sub-string not found
String:    "macOS 14.7.6"
Not found: "Darwin"
  Stack Trace:
     at OpenTelemetry.Resources.OperatingSystem.Test.OperatingSystemDetectorTests.TestOperatingSystemAttributes() in /Users/runner/work/opentelemetry-dotnet-contrib/opentelemetry-dotnet-contrib/test/OpenTelemetry.Resources.OperatingSystem.Tests/OperatingSystemDetectorTests.cs:line 49
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

@martincostello
Copy link
Member Author

Need to investigate macOS test failure with .NET 10

Due to changes in dotnet/runtime#113041.

@github-actions github-actions bot added the comp:resources.operatingsystem Things related to OpenTelemetry.Resources.OperatingSystem label Jun 9, 2025
@github-actions github-actions bot added the comp:instrumentation.hangfire Things related to OpenTelemetry.Instrumentation.Hangfire label Jun 11, 2025
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

This was referenced Nov 13, 2025
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:exporter.influxdb Things related to OpenTelemetry.Exporter.InfluxDB comp:exporter.instana Things related to OpenTelemetry.Instrumentation.Instana comp:exporter.onecollector Things related to OpenTelemetry.Exporter.OneCollector comp:extensions.aws Things related to OpenTelemetry.Extensions.AWS comp:extensions.enrichment Things related to OpenTelemetry.Extensions.Enrichment comp:extensions Things related to OpenTelemetry.Extensions comp:instrumentation.aspnetcore Things related to OpenTelemetry.Instrumentation.AspNetCore comp:instrumentation.aws Things related to OpenTelemetry.Instrumentation.AWS comp:instrumentation.awslambda Things related to OpenTelemetry.Instrumentation.AWSLambda comp:instrumentation.cassandra Things related to OpenTelemetry.Instrumentation.Cassandra comp:instrumentation.confluentkafka Things related to OpenTelemetry.Instrumentation.ConfluentKafka comp:instrumentation.elasticsearchclient Things related to OpenTelemetry.Instrumentation.ElasticsearchClient comp:instrumentation.entityframeworkcore Things related to OpenTelemetry.Instrumentation.EntityFrameworkCore comp:instrumentation.eventcounters Things related to OpenTelemetry.Instrumentation.EventCounters comp:instrumentation.grpccore Things related to OpenTelemetry.Instrumentation.GrpcCore comp:instrumentation.grpcnetclient Things related to OpenTelemetry.Instrumentation.GrpcNetClient comp:instrumentation.hangfire Things related to OpenTelemetry.Instrumentation.Hangfire comp:instrumentation.http Things related to OpenTelemetry.Instrumentation.Http comp:instrumentation.owin Things related to OpenTelemetry.Instrumentation.Owin comp:instrumentation.process Things related to OpenTelemetry.Instrumentation.Process comp:instrumentation.quartz Things related to OpenTelemetry.Instrumentation.Quartz comp:instrumentation.runtime Things related to OpenTelemetry.Instrumentation.Runtime comp:instrumentation.servicefabricremoting Things related to OpenTelemetry.Instrumentation.ServiceFabricRemoting comp:instrumentation.sqlclient Things related to OpenTelemetry.Instrumentation.SqlClient comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis comp:instrumentation.wcf Things related to OpenTelemetry.Instrumentation.Wcf comp:opamp.client Things related to OpenTelemetry.OpAmp.Client comp:persistentstorage.abstractions Things related to OpenTelemetry.PersistentStorage.Abstractions comp:persistentstorage.filesystem Things related to OpenTelemetry.PersistentStorage.FileSystem comp:resources.aws Things related to OpenTelemetry.Resources.AWS comp:resources.azure Things related to OpenTelemetry.Resources.Azure comp:resources.container Things related to OpenTelemetry.Resources.Container comp:resources.gcp Things related to OpenTelemetry.Resources.Gcp comp:resources.host Things related to OpenTelemetry.Resources.Host comp:resources.operatingsystem Things related to OpenTelemetry.Resources.OperatingSystem comp:resources.process Things related to OpenTelemetry.Resources.Process comp:resources.processruntime Things related to OpenTelemetry.Resources.ProcessRuntime comp:sampler.aws Things related to OpenTelemetry.Samplers.AWS dependencies Pull requests that update a dependency file infra Infra work - CI/CD, code coverage, linters keep-open Prevents issues and pull requests being closed as stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Remove Explicit Dependency on System.Text.Json in OpenTelemetry.Exporter.OneCollector on net8.0