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

.NET 8 default AOT build in docker trimming constructor of Amazon.XRay.Recorder.Core.Sampling.Local.SamplingConfiguration #295

Open
gabrielfantin opened this issue Apr 17, 2024 · 0 comments

Comments

@gabrielfantin
Copy link

We built a .NET 8 console app to run as an ECS task using native AOT deployment but it was throwing this exception when ran in ECS. We are using the X-Ray's default instance configuration.

imagem

To get it working, we had to exclude the X-Ray from the trimmer

.csproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <PublishAot>true</PublishAot>
    <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
	<TrimMode>partial</TrimMode> <!-- needed to include this -->
  </PropertyGroup>

 <!-- needed to include this -->
    <ItemGroup>
        <TrimmerRootAssembly Include="Amazon.XRay.*" />
    </ItemGroup>

</Project>

I tried to manually configure the sampling strategy in hope that it would get rid of the exception, but that didn't work

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

No branches or pull requests

1 participant