feat: Added internal bool CaptureAttachment to Hub#4357
Merged
bitsandfoxes merged 18 commits intomainfrom Jul 21, 2025
Merged
Conversation
Contributor
|
bitsandfoxes
commented
Jul 16, 2025
internal bool CaptureAttachment to SentrySdkinternal bool CaptureAttachment to Hub
Flash0ver
reviewed
Jul 17, 2025
Flash0ver
reviewed
Jul 17, 2025
Flash0ver
reviewed
Jul 17, 2025
Flash0ver
reviewed
Jul 18, 2025
Flash0ver
reviewed
Jul 18, 2025
Flash0ver
reviewed
Jul 18, 2025
Flash0ver
reviewed
Jul 18, 2025
Flash0ver
reviewed
Jul 18, 2025
Flash0ver
approved these changes
Jul 21, 2025
Member
Flash0ver
left a comment
There was a problem hiding this comment.
thanks! ... I posted 2 more non-blocking comments
| var eventId = SentryId.Create(); | ||
| var attachment = new SentryAttachment( | ||
| AttachmentType.Default, | ||
| new ByteAttachmentContent("test content"u8.ToArray()), |
Member
There was a problem hiding this comment.
question: could/should we add an internal constructor, that takes a ReadOnlySpan<byte>, so that we can omit the .ToArray() at the call sites?
internal ByteAttachmentContent(ReadOnlySpan<byte> bytes) => _bytes = bytes.ToArray();Or is that overkill, because we only have 2 usages that would be shortened.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's possible to send attachments to Sentry on their own and still have them associated with an event. See dev docs.
This is something the Unity SDK would make use of. Since screenshot capture is not possible at the time the SDK captures an event, screenshot capture itself is delayed and the attachment is then sent separately.
We keep this as
internalon the hub as this should not be user-facing.#skip-changelog