grafana / pyroscope

Continuous Profiling Platform. Debug performance issues down to a single line of code
https://grafana.com/oss/pyroscope/
GNU Affero General Public License v3.0
9.66k stars 577 forks source link

Update dotnet examples to SDK version 8 #3288

Closed simonswine closed 1 month ago

simonswine commented 2 months ago

Unfortunately, this doesn't work for me on Apple M2, with rosetta I get build errors, works on my linux/amd64 machine though:

# For musl
$ docker buildx build --load --platform linux/amd64 examples/language-sdk-instrumentation/dotnet/rideshare/  -f examples/language-sdk-instrumentation/dotnet/rideshare/musl.Dockerfile
[...]
 => ERROR [stage-0 6/6] RUN dotnet publish -o . -r $(dotnet --info | grep RID | cut -b 6- | tr -d ' ')                                                                                                                                          1.7s
------
 > [stage-0 6/6] RUN dotnet publish -o . -r $(dotnet --info | grep RID | cut -b 6- | tr -d ' '):
1.564 The expression "[MSBuild]::GetTargetPlatformIdentifier('')" cannot be evaluated. Exception has been thrown by the target of an invocation.  /usr/share/dotnet/sdk/8.0.204/Sdks/Microsoft.NET.Sdk.Web/Sdk/Sdk.props
1.581 MSBuild version 17.9.8+b34f75857 for .NET
------

# For glibc
$ docker buildx build --load --platform linux/amd64 examples/language-sdk-instrumentation/dotnet/rideshare/
  => ERROR [stage-0 6/6] RUN dotnet publish -o . -r $(dotnet --info | grep RID | cut -b 6- | tr -d ' ')                                                                                                                                          1.7s
------
 > [stage-0 6/6] RUN dotnet publish -o . -r $(dotnet --info | grep RID | cut -b 6- | tr -d ' '):
1.634 terminate called after throwing an instance of 'PAL_SEHException'
1.639 Aborted

Not really too sure if that is something broken locally, wonder if some of you could give it a try before merging. @grafana/pyroscope-dotnet

bryanhuhta commented 1 month ago

Unfortunately, this doesn't work for me on Apple M2, with rosetta I get build errors

I recall @aleks-p had to use his personal Windows machine to develop the .NET span profiles feature for this exact reason.

simonswine commented 1 month ago

@korniltsev also reported this stops working with his orb/docker on linux/amd64 setup. Let's keep the sdk6 then