perf: avoid activity id conversion allocations#5239
Conversation
Co-Authored-By: OpenAI Codex <codex@openai.com>
|
Local validation on
The |
jamescrosswell
left a comment
There was a problem hiding this comment.
Thanks @Sean-Kenneth-Doherty .
I added a couple of commits to tidy up the code from Codex (the code was technically correct but it wasn't very obvious what that code was doing, so hard to maintain).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5239 +/- ##
==========================================
- Coverage 74.12% 74.10% -0.02%
==========================================
Files 508 508
Lines 18282 18315 +33
Branches 3574 3581 +7
==========================================
+ Hits 13551 13573 +22
- Misses 3861 3870 +9
- Partials 870 872 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #4289.
#skip-changelog
Summary
SpanIdandSentryId.Activity*Idvalues with stackallocated byte buffers onnet8.0+, avoiding the intermediateToString()allocation.Verification
dotnet test /home/sean/.cache/codex/oss-contrib/sentry-dotnet-otel-alloc/test/Sentry.OpenTelemetry.Exporter.Tests/Sentry.OpenTelemetry.Exporter.Tests.csproj --framework net10.0 --no-restore /p:MSBuildEnableWorkloadResolver=false /p:WorkloadList=none /p:NO_MOBILE=truedotnet build /home/sean/.cache/codex/oss-contrib/sentry-dotnet-otel-alloc/src/Sentry.OpenTelemetry.Exporter/Sentry.OpenTelemetry.Exporter.csproj --framework netstandard2.0 --no-restore /p:MSBuildEnableWorkloadResolver=false /p:WorkloadList=none /p:NO_MOBILE=truedotnet build /home/sean/.cache/codex/oss-contrib/sentry-dotnet-otel-alloc/src/Sentry.OpenTelemetry.Exporter/Sentry.OpenTelemetry.Exporter.csproj --framework net462 --no-restore /p:MSBuildEnableWorkloadResolver=false /p:WorkloadList=none /p:NO_MOBILE=truegit diff --checkAI assistance: This PR was prepared with OpenAI Codex.