You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/apple/guides/ios/session-replay/customredact.mdx
+26-26Lines changed: 26 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,24 +21,24 @@ You can choose which type of view you want to mask or unmask by using the `maske
21
21
Let's say you have a custom view that you want to mask and a `UILabel` subclass (which normally would be masked) that you don't want to mask. You can set the options like this:
You can also choose to mask or unmask a specific view instance by using the replay API (`SentrySDK.replay`) or view extensions like this:
31
31
32
32
```swift
33
-
SentrySDK.replay.maskView(view: view)
34
-
SentrySDK.replay.unmaskView(view: label)
33
+
SentrySDK.replay.maskView(view: view)
34
+
SentrySDK.replay.unmaskView(view: label)
35
35
```
36
36
37
37
or
38
38
39
39
```swift
40
-
view.sentryReplayMask()
41
-
label.sentryReplayUnmask()
40
+
view.sentryReplayMask()
41
+
label.sentryReplayUnmask()
42
42
```
43
43
44
44
## SwiftUI
@@ -49,46 +49,46 @@ In order to control the SwiftUI masking process, you need to use the `sentryRepl
49
49
In this example we want to show the message, but not the user name.
50
50
51
51
```swift
52
-
@Bindingvar user: String
53
-
54
-
var body: some View {
55
-
VStack {
56
-
Text("Hello")
57
-
.sentryReplayUnmask()
58
-
Text("\(user)")
59
-
}
52
+
@Bindingvar user: String
53
+
54
+
var body: some View {
55
+
VStack {
56
+
Text("Hello")
57
+
.sentryReplayUnmask()
58
+
Text("\(user)")
60
59
}
60
+
}
61
61
```
62
62
63
63
In this example, we need to unmask the VStack because its background element will be masked by default.
64
64
To hide the username, we need to mask it.
65
65
66
66
```swift
67
-
@Bindingvar user: String
68
-
69
-
var body: some View {
70
-
VStack {
71
-
Text("Hello")
72
-
Text("\(user)")
73
-
.sentryReplayMask()
74
-
}
75
-
.background(.blue)
76
-
.sentryReplayUnmask()
67
+
@Bindingvar user: String
68
+
69
+
var body: some View {
70
+
VStack {
71
+
Text("Hello")
72
+
Text("\(user)")
73
+
.sentryReplayMask()
77
74
}
75
+
.background(.blue)
76
+
.sentryReplayUnmask()
77
+
}
78
78
```
79
79
80
80
## Debugging Session Replay masking
81
81
82
82
To see how elements are being masked, enable the masking preview from anywhere in your app. It will display an overlay on top of the masked elements. This works on the simulator and on device, as well as within Xcode Preview.
83
83
84
84
```swift
85
-
SentrySDK.replay.showMaskPreview()
85
+
SentrySDK.replay.showMaskPreview()
86
86
```
87
87
88
88
By default, the overlay will be opaque. To configure the opacity, pass the desired opacity as a parameter:
89
89
90
90
```swift
91
-
SentrySDK.replay.showMaskPreview(0.5) // 0.5 opacity to render the preview semi-transparent
91
+
SentrySDK.replay.showMaskPreview(0.5) // 0.5 opacity to render the preview semi-transparent
92
92
```
93
93
94
94
Make sure not accidentally include this in your release build by e.g. wrapping it in a `#if DEBUG` block.
description: "Structured logs allow you to send, view and query logs sent from your applications within Sentry."
5
+
sidebar_order: 5755
6
+
---
7
+
8
+
<Includename="feature-stage-beta-logs.mdx" />
9
+
10
+
With Sentry Structured Logs, you can send text based log information from your applications to Sentry. Once in Sentry, these logs can be viewed alongside relevant errors, searched by text-string, or searched using their individual attributes.
description: "Structured logs allow you to send, view and query logs sent from your applications within Sentry."
5
+
sidebar_order: 5755
6
+
---
7
+
8
+
<Includename="feature-stage-beta-logs.mdx" />
9
+
10
+
With Sentry Structured Logs, you can send text based log information from your applications to Sentry. Once in Sentry, these logs can be viewed alongside relevant errors, searched by text-string, or searched using their individual attributes.
Copy file name to clipboardExpand all lines: docs/platforms/dotnet/common/troubleshooting.mdx
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,49 @@ will not be sent to Sentry. If Sentry cannot locate symbols, then it cannot perf
26
26
This means that for some types of projects (depending on configuration), you may not see filenames and line numbers
27
27
to help you locate the source of an exception.
28
28
29
+
## Detected package version outside of dependency constraint
30
+
31
+
In .NET for Android applications the Sentry SDK needs to make use of a limited number of Android APIs that form part of the operating system. Implicitly, Sentry depends on [various Java packages](https://github.com/getsentry/sentry-dotnet/blob/ebc1115d6c928ff56244afa3a1ce1d79b078fbf4/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj#L45-L56) then.
32
+
33
+
If you are using third party libraries that depend on different versions of these same Java packages, you may see `NU1605`, `NU1608` and/or `NU1107` warnings when trying to run `dotnet restore`.
34
+
35
+
Sentry itself only specifies a minimum version of the Java packages that it depends on, so is compatible with any higher versions of the same Java packages. However, these Java packages come with their own dependencies, which are therefore transitive dependencies for Sentry. The transitive dependencies of the Sentry SDK can sometimes be incompatible with the transitive dependencies of other third party libraries and NuGet isn't smart enough to resolve those conflicts without a bit of guidance.
36
+
37
+
Such problems need to be resolved on a case by case basis but the following example should demonstrate how you can resolve these issues if you run into them in your own application.
38
+
39
+
### Example Problem
40
+
41
+
If you use `Sentry``5.7.0` in a .NET for Android application targeting `net9.0-android` then Sentry will have various [direct dependencies](https://www.nuget.org/packages/Sentry/5.7.0#dependencies-body-tab). However those direct dependencies come with their own dependencies, which for Sentry are transitive dependencies.
42
+
43
+
If you also use `Microsoft.Maui.Essentials` version `9.0.50`, ultimately it depends on conflicting version of those same transitive dependencies.
44
+
45
+
In this scenario you would see a warning or an error like the following when running `dotnet restore`:
46
+
```
47
+
NU1608: Detected package version outside of dependency constraint: Xamarin.AndroidX.Lifecycle.Common.Java8 2.8.5.1 requires Xamarin.AndroidX.Lifecycle.Common (>= 2.8.5.1 && < 2.8.6) but version Xamarin.AndroidX.Lifecycle.Common 2.8.7.2 was resolved.
48
+
```
49
+
50
+
### Example Solution
51
+
52
+
To resolve the problem above, you can use [Transitive Pinning](https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management#transitive-pinning) to resolve explicit versions of transitive dependencies (rather than letting NuGet resolve these automatically).
53
+
54
+
To enable Transitive Pinning, add the following to your `csproj` or `Directory.Build.props` file:
Although the Sentry SDK only needs `Xamarin.AndroidX.Lifecycle.Common.Java8 2.8.5.1`, that version is problematic since it locks the transitive dependency `Xamarin.AndroidX.Lifecycle.Common` into the range `(>= 2.8.5.1 && < 2.8.6)`. By explicitly pinning `Xamarin.AndroidX.Lifecycle.Common.Java8` to `2.8.7.2` to match the version used by `Microsoft.Maui.Essentials`, we can resolve the conflict.
71
+
29
72
## Updating to 4.12.0 broke my .NET iOS App
30
73
31
74
Support for Xcode 16.0 was added on version 4.12.0 of the Sentry SDK for .NET
0 commit comments