getsentry / getsentry/sentry-dotnet

perf: use `ConfigureScope` overload to avoid Closure allocations where possible

Open
#5,219 1 comment 0 reactions 0 assignees View on GitHub
.NET Improvement Performance
Dominant language
C#
Stars
770
Forks
248
Avg merge
3d 4h
Merged PRs (30d)
49

Description

### Description

### Summary

Use `ConfigureScope` overload that receives _"state"_ to avoid Closure allocations where possible.

### Remarks

In #4244, we added a `ConfigureScope` overload that takes _state_ in order to avoid Closure-allocations.

After #5039 (see https://github.com/getsentry/sentry-dotnet/pull/5039#discussion_r3222023584), there is another location to avoid the Closure.

After a quick search, I believe there are 2 or 3 additional opportunities to avoid the Closure.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.