Skip to content

Commit 17a4449

Browse files
authored
fix: missing snippets dotnet (#5752)
1 parent 23e6fa0 commit 17a4449

File tree

3 files changed

+33
-0
lines changed
  • src
    • platform-includes
    • platforms/common/data-management/debug-files/upload

3 files changed

+33
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
```csharp
2+
using Sentry;
3+
4+
sentryOptions.TracesSampler = context =>
5+
{
6+
if (context.TransactionContext.IsParentSampled is true)
7+
{
8+
return 1.0; // Keep all traces complete
9+
}
10+
11+
// the rest of sampling logic, for example:
12+
if (context.TransactionContext.Name == "important-endpoint")
13+
{
14+
return 1.0; // 100% for
15+
}
16+
17+
return 0.5; // 50% for everything else
18+
19+
};
20+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
```bash
2+
sentry-cli login
3+
sentry-cli upload-dif -o {YOUR ORGANISATION} -p {PROJECT} bin/Release
4+
```

src/platforms/common/data-management/debug-files/upload/index.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ application:
2020

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

23+
<PlatformSection supported={["dotnet"]}>
24+
<Note>
25+
26+
The Sentry support for .NET requires uploading debug files only on mobile (Android and iOS) apps.
27+
Managed PDBs are not yet supported.
28+
29+
</Note>
30+
</PlatformSection>
31+
2332
Files can be uploaded using the `upload-dif` command. This command will scan a
2433
given folder recursively for files and upload them to Sentry:
2534

0 commit comments

Comments
 (0)