Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ Attachments are retained for 30 or 90 days, based on [your plan's data retention

Learn more about how attachments impact your [quota](/pricing/quotas/).

### Sending Attachments with Transactions

By default, scope attachments are only sent with error events, not with transactions. To also send an attachment with transactions, set `addToTransactions` to `true` when you create the `SentryAttachment`, then add it to the scope:

<PlatformContent includePath="enriching-events/attachment-add-to-transactions" />

### Access to Attachments

To limit access to attachments, navigate to your organization's **General Settings**, then select the _Attachments Access_ dropdown to set appropriate access — any member of your organization, the organization billing owner, member, admin, manager, or owner.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
```csharp
// Create an attachment that is also sent with transactions
var attachment = new SentryAttachment(
AttachmentType.Default,
new FileAttachmentContent("your/path/file.log"),
fileName: "file.log",
contentType: null,
addToTransactions: true);

// Add it to the scope - it's now sent with both events and transactions
SentrySdk.ConfigureScope(scope => scope.AddAttachment(attachment));
```

```fsharp
// Create an attachment that is also sent with transactions
let attachment =
SentryAttachment(
AttachmentType.Default,
FileAttachmentContent("your/path/file.log"),
"file.log",
null,
addToTransactions = true)

// Add it to the scope - it's now sent with both events and transactions
SentrySdk.ConfigureScope(fun scope -> scope.AddAttachment(attachment))
```
Loading