getsentry / getsentry/sentry-dotnet

Scope sync attachments for Android, iOS and Native

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

Description

> This was actually just added in 0.13.3 of the Native SDK:
> - https://github.com/getsentry/sentry-dotnet/pull/5045#issue-4105528155
>
> We should probably add a follow up task for this (and to investigate the other native syncs).

_Originally posted by @jamescrosswell in [#5038](https://github.com/getsentry/sentry-dotnet/pull/5038/changes#r2973184717)_

> [!WARNING]
> Before implementing for Native, consider/verify how scopes are stored in the Native SDK. Can they be AsyncLocal? If not, we don't want to add attachments from one AsyncLocal scope that get added to events from another AsyncLocal scope... in an ASP.NET Core app (native AOT), that could result in attachments relating to one request being added to events from other requests.
>
> This isn't an issue for Andoid/iOS but needs to be considered for AOT compiled server apps.
>
> See:
> - https://github.com/getsentry/sentry-dotnet/pull/5038/changes#r2973218910
>
> ➡️ A possible solution to this is to limit the attachment sync to global scope mode.

> [!IMPORTANT]
> If we do this after https://github.com/getsentry/sentry-dotnet/issues/4061 then we have to circle back and update those docs again
> - https://github.com/getsentry/sentry-dotnet/issues/4061
>
> Maybe it's just easier to implement the scope sync and avoid double handing on the docs.

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.