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

Support for .NET 9 #3766

Closed
stevejgordon opened this issue Nov 13, 2024 · 10 comments
Closed

Support for .NET 9 #3766

stevejgordon opened this issue Nov 13, 2024 · 10 comments
Assignees
Milestone

Comments

@stevejgordon
Copy link

Feature Request

Is your feature request related to a problem? Please describe.

Enabling auto instrumentation for a .NET 9 application currently fails as there is no net9.0 directory in the store.

[StartupHook] [2024-11-13T09:19:46.9432178Z] [Warning] Rule Engine: Couldn't evaluate reference to runtime store assemblies in an app.
Exception: Could not find a part of the path '/app/otel/store/x64/net9.0'.
System.IO.DirectoryNotFoundException: Could not find a part of the path '/app/otel/store/x64/net9.0'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
   at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at System.IO.Directory.GetFiles(String path, String searchPattern, EnumerationOptions enumerationOptions)
   at OpenTelemetry.AutoInstrumentation.RulesEngine.RuntimeStoreDiagnosticRule.Evaluate() in /_/src/OpenTelemetry.AutoInstrumentation.StartupHook/RulesEngine/RuntimeStoreDiagnosticRule.cs:line 41

Describe the solution you'd like

Support for .NET 9

Additional context
Add any other context or screenshots about the feature request here.

Is there a timeframe for supporting .NET 9 now that it has gone GA?

@Kielek Kielek added this to the 1.10.0 milestone Nov 13, 2024
@Kielek
Copy link
Contributor

Kielek commented Nov 13, 2024

@stevejgordon, first we need to do some work on https://github.com/open-telemetry/opentelemetry-dotnet-contrib repository. I hope, most of this things will be ready next week.

The tentative schedule for the release this project is end of November.

Adding this to Milestone 1.10.0.

@stevejgordon
Copy link
Author

Okay, thanks, @Kielek. If there's any low-hanging fruit I can assist with next week, I'd likely have time to contribute.

I need to investigate further, but I ran into issues with auto instrumentation after updating our WIP distro to 1.10, which includes a plugin we register for the auto instrumentation. I've not looked deep enough yet, but my theory is that the bundling of 1.9 in the profiler might be causing the mismatch and leading to a TypeLoadException for our code. I'll wait for the 1.10 and try again.

@pellared
Copy link
Member

Possibly related issue open-telemetry/opentelemetry-dotnet#5973

@Kielek
Copy link
Contributor

Kielek commented Nov 14, 2024

@pellared, the root cause of the issue, is the lack of the additional store in /app/otel/store/x64/net9.0. In this folder you should have already net6.0/net7.0/net8.0.

@stevejgordon, there is couple things we should change, most of them are related to our build-pipeline/dependencies. Please check following list:

  • Change the linux native code builder from Centos to Ubuntu (the exact version should be checked with the lowest supported version by .NET8.0)
  • Remove Centos from the build pipeline
  • Replace .net6 and .net7 by .net9 in pipeline/target frameworks
  • Update OTel .NET SDK to 1.10.0.
  • Take new dependencies from OTel-contrib repository, all of them should be compiled against OTel .NET SDK 1.10.0 (it will ensure that works correctly with .NET9).

Nice to have maintenance tasks in OTel .NET Contrib:

Blockers:

Probably some other stuff.

I think that it for you, it will be easier to help on contrib side. Like open-telemetry/opentelemetry-dotnet-contrib#2071.

I will be happy to include you in all PRs in this repository also. We will need a help in the next year for .NET10 support. It will be easier to follow examples (next week probably).

Please let me know what do you think about this.

@stevejgordon
Copy link
Author

That sounds good, @Kielek. I've commented on open-telemetry/opentelemetry-dotnet-contrib#2071 as someone had grabbed it but I don't see any progress since. I'll get familiar with this repo and I'm happy to be included on any PRs etc.

@stevejgordon
Copy link
Author

@Kielek For those other items, where there are no issues. Are you happy for me to create issues to be added to a 1.10.0 milestone and tackle some of the hopefully simpler ones!

@Kielek
Copy link
Contributor

Kielek commented Dec 2, 2024

@stevejgordon, sorry, I have missed you last comment.
Some update in this topic, I have problematic cases #3839 and #3838. If you have time to investigate the root cause/create PR with the fixes. It is more than welcomed.

Edit: also #3841

@pjanotti pjanotti moved this from Committed to In progress in OpenTelemetry .NET Automatic Instrumentation Dec 4, 2024
@Kielek
Copy link
Contributor

Kielek commented Dec 4, 2024

SIG meeting note: hopefully next week - make a beta.1 release to make it available for the end-users.
Final version expected early next month (year). We would like to avoid any problematic stuff during the holidays.

@Kielek
Copy link
Contributor

Kielek commented Dec 16, 2024

@stevejgordon, released as a beta 1.10.0-beta.1.

Please let me know if it is working for your, do you have any feedback, etc.

@Kielek Kielek closed this as completed Dec 16, 2024
@Kielek Kielek self-assigned this Dec 16, 2024
@stevejgordon
Copy link
Author

Thanks so much, @Kielek. I'll take it for a spin the first week after the holidays.

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

No branches or pull requests

3 participants