Skip to content

Commit dd6851a

Browse files
committed
Merge branch 'main' into chore/new-unity-structure
2 parents 2bc178f + f52cd00 commit dd6851a

11 files changed

Lines changed: 41 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22

33
## Unreleased
44

5+
### Dependencies
6+
7+
- Bump Cocoa SDK from v9.12.0 to v9.12.1 ([#2670](https://github.com/getsentry/sentry-unity/pull/2670))
8+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#9121)
9+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/9.12.0...9.12.1)
10+
- Bump Java SDK from v8.40.0 to v8.41.0 ([#2669](https://github.com/getsentry/sentry-unity/pull/2669))
11+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8410)
12+
- [diff](https://github.com/getsentry/sentry-java/compare/8.40.0...8.41.0)
13+
14+
## 4.3.1
15+
516
### Fixes
617

7-
- The SDK no longer sends screenshot attachments for events that were dropped during processing (e.g., by `BeforeSend` or sampling) ([#2661](https://github.com/getsentry/sentry-unity/pull/2661))
18+
- The SDK no longer sends screenshot attachments for events that were dropped during processing (e.g., by `BeforeSend` or sampling). ([#2661](https://github.com/getsentry/sentry-unity/pull/2661))
19+
- The SDK now forwards `EnableLogs` and `EnableMetrics` to the native layer. ([#2662](https://github.com/getsentry/sentry-unity/pull/2662))
820

921
### Dependencies
1022

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>4.3.0</Version>
3+
<Version>4.3.1</Version>
44
<LangVersion>12</LangVersion>
55
<Nullable>enable</Nullable>
66
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Install the package via the Unity Package Manager using a Git URL to Sentry's SD
2323
https://github.com/getsentry/unity.git
2424
```
2525

26-
To use this specific version of the SDK, append `#4.3.0` to the URL, but note that this will stop Unity from suggesting version updates automatically.
26+
To use this specific version of the SDK, append `#4.3.1` to the URL, but note that this will stop Unity from suggesting version updates automatically.
2727

2828
## Documentation
2929

modules/sentry-cocoa

Submodule sentry-cocoa updated 130 files

modules/sentry-java

Submodule sentry-java updated 180 files

package/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Install the package via the Unity Package Manager using a Git URL to Sentry's SD
2222
https://github.com/getsentry/unity.git
2323
```
2424

25-
To use this specific version of the SDK, append `#4.3.0` to the URL.
25+
To use this specific version of the SDK, append `#4.3.1` to the URL.
2626

2727

2828
## Source code

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "io.sentry.unity",
3-
"version": "4.3.0",
3+
"version": "4.3.1",
44
"displayName": "Sentry Unity",
55
"description": "Sentry SDK for Unity",
66
"unity": "2021.3",

src/Sentry.Unity.Android/SentryJava.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,16 @@ public void Init(SentryUnityOptions options)
140140
androidOptions.Call("setEnableScopeSync", options.NdkScopeSyncEnabled);
141141
androidOptions.Call("setNativeSdkName", "sentry.native.android.unity");
142142

143+
using (var logsOptions = androidOptions.Call<AndroidJavaObject>("getLogs"))
144+
{
145+
logsOptions.Call("setEnabled", options.EnableLogs);
146+
}
147+
148+
using (var metricsOptions = androidOptions.Call<AndroidJavaObject>("getMetrics"))
149+
{
150+
metricsOptions.Call("setEnabled", options.EnableMetrics);
151+
}
152+
143153
// Options that are not to be set by the user
144154
// We're disabling some integrations as to not duplicate event or because the SDK relies on the .NET SDK
145155
// implementation of certain feature - i.e. Session Tracking

src/Sentry.Unity.Native/SentryNativeBridge.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ is RuntimePlatform.WindowsPlayer or RuntimePlatform.WindowsServer
9393
}
9494
#endif
9595

96+
Logger?.LogDebug("Setting EnableLogs: {0}", options.EnableLogs);
97+
sentry_options_set_enable_logs(cOptions, options.EnableLogs ? 1 : 0);
98+
9699
Logger?.LogDebug("Setting EnableMetrics: {0}", options.EnableMetrics);
97100
sentry_options_set_enable_metrics(cOptions, options.EnableMetrics ? 1 : 0);
98101

@@ -169,6 +172,9 @@ internal static string GetDatabasePath(SentryUnityOptions options, IApplication?
169172
[DllImport(SentryLib)]
170173
private static extern void sentry_options_set_attach_screenshot(IntPtr options, int attachScreenshot);
171174

175+
[DllImport(SentryLib)]
176+
private static extern void sentry_options_set_enable_logs(IntPtr options, int enable_logs);
177+
172178
[DllImport(SentryLib)]
173179
private static extern void sentry_options_set_enable_metrics(IntPtr options, int enable_metrics);
174180

src/Sentry.Unity.iOS/SentryCocoaBridgeProxy.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ public static bool Init(SentryUnityOptions options)
7272
Logger?.LogDebug("Setting CaptureFailedRequests: {0}", options.CaptureFailedRequests);
7373
OptionsSetInt(cOptions, "enableCaptureFailedRequests", options.CaptureFailedRequests ? 1 : 0);
7474

75+
Logger?.LogDebug("Setting EnableLogs: {0}", options.EnableLogs);
76+
OptionsSetInt(cOptions, "enableLogs", options.EnableLogs ? 1 : 0);
77+
78+
Logger?.LogDebug("Setting EnableMetrics: {0}", options.EnableMetrics);
79+
OptionsSetInt(cOptions, "enableMetrics", options.EnableMetrics ? 1 : 0);
80+
7581
foreach (var range in options.FailedRequestStatusCodes)
7682
{
7783
Logger?.LogDebug("Adding FailedRequestStatusCodeRange: {0}-{1}", range.Start, range.End);

0 commit comments

Comments
 (0)