Skip to content

fix: missing snippets dotnet #5752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 11, 2022
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
@@ -0,0 +1,20 @@
```csharp
using Sentry;

sentryOptions.TracesSampler = context =>
{
if (context.TransactionContext.IsParentSampled is true)
{
return 1.0; // Keep all traces complete
}

// the rest of sampling logic, for example:
if (context.TransactionContext.Name == "important-endpoint")
{
return 1.0; // 100% for
}

return 0.5; // 50% for everything else

};
```
4 changes: 4 additions & 0 deletions src/platform-includes/upload-dif/dotnet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```bash
sentry-cli login
sentry-cli upload-dif -o {YOUR ORGANISATION} -p {PROJECT} bin/Release
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattjohnsonpint do we need to upload from obj/Release instead? or is the path here completely different?

```
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ application:

![](debug-files-workflow.png)

<PlatformSection supported={["dotnet"]}>
<Note>

The Sentry support for .NET requires uploading debug files only on mobile (Android and iOS) apps.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be updated once getsentry/sentry-dotnet#1740 is completed, cc @Swatinem, @ashwoods

Managed PDBs are not yet supported.

</Note>
</PlatformSection>

Files can be uploaded using the `upload-dif` command. This command will scan a
given folder recursively for files and upload them to Sentry:

Expand Down