Skip to content

Commit

Permalink
Add arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
rajkumar-rangaraj committed Mar 29, 2024
1 parent 57f920a commit f2410d6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/OpenTelemetry.AutoInstrumentation.Loader/Loader.Net.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#if NETCOREAPP
using System.Reflection;
using System.Runtime.InteropServices;

namespace OpenTelemetry.AutoInstrumentation.Loader;

Expand Down Expand Up @@ -33,7 +34,13 @@ private static string ResolveManagedProfilerDirectory()
return null;
}

var architecture = Environment.Is64BitProcess ? "x64" : "x86";
var architecture = RuntimeInformation.ProcessArchitecture switch
{
Architecture.X86 => "x86",
Architecture.Arm64 => "arm64",
_ => "x64" // Default to x64 for architectures not explicitly handled
};

var targetFramework = $"net{Environment.Version.Major}.{Environment.Version.Minor}";
var finalPath = Path.Combine(storeDirectory, architecture, targetFramework);

Expand Down

0 comments on commit f2410d6

Please sign in to comment.