Skip to content

Commit 15b78ac

Browse files
Merge remote-tracking branch 'origin/version7' into version7
Picks up #5631 (ScopeObserver, EnableScopeSync and CrashedLastRun are now internal), which landed while main was being merged in. Its API snapshot removals and the additions this merge brought from main are in different places, so the snapshots merged cleanly; verified by re-running ApiApprovalTests rather than trusting the textual merge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2 parents 839ee61 + 54448e7 commit 15b78ac

9 files changed

Lines changed: 8 additions & 23 deletions

‎src/Sentry/BindableSentryOptions.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ namespace Sentry;
88
internal partial class BindableSentryOptions
99
{
1010
public bool? IsGlobalModeEnabled { get; set; }
11-
public bool? EnableScopeSync { get; set; }
1211
public bool? EnableBackpressureHandling { get; set; }
1312
public List<string>? TagFilters { get; set; }
1413
public List<string>? IgnoreTransactions { get; set; }
@@ -63,7 +62,6 @@ internal partial class BindableSentryOptions
6362
public void ApplyTo(SentryOptions options)
6463
{
6564
options.IsGlobalModeEnabled = IsGlobalModeEnabled ?? options.IsGlobalModeEnabled;
66-
options.EnableScopeSync = EnableScopeSync ?? options.EnableScopeSync;
6765
options.EnableBackpressureHandling = EnableBackpressureHandling ?? options.EnableBackpressureHandling;
6866
options.TagFilters = TagFilters?.Select(s => new StringOrRegex(s)).ToList() ?? options.TagFilters;
6967
options.IgnoreTransactions = IgnoreTransactions?.Select(s => new StringOrRegex(s)).ToList() ?? options.IgnoreTransactions;

‎src/Sentry/Platforms/Unity/Sentry.Unity.props‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99

1010
<ItemGroup>
1111
<InternalsVisibleTo Include="Sentry.Unity" />
12+
<InternalsVisibleTo Include="Sentry.Unity.Android" />
13+
<InternalsVisibleTo Include="Sentry.Unity.iOS" />
14+
<InternalsVisibleTo Include="Sentry.Unity.Native" />
1215
<InternalsVisibleTo Include="Sentry.Unity.Tests" />
16+
<InternalsVisibleTo Include="Sentry.Unity.Android.Tests" />
17+
<InternalsVisibleTo Include="Sentry.Unity.iOS.Tests" />
1318
</ItemGroup>
1419

1520
</Project>

‎src/Sentry/SentryOptions.cs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ public bool IsGlobalModeEnabled
8787
/// A scope set outside of Sentry SDK. If set, the global parameters from the SDK's scope will be sent to the observed scope.<br/>
8888
/// NOTE: EnableScopeSync must be set true for the scope to be synced.
8989
/// </summary>
90-
public IScopeObserver? ScopeObserver { get; set; }
90+
internal IScopeObserver? ScopeObserver { get; set; }
9191

9292
/// <summary>
9393
/// If true, the SDK's scope will be synced with the observed scope.
9494
/// </summary>
95-
public bool EnableScopeSync { get; set; }
95+
internal bool EnableScopeSync { get; set; }
9696

9797
/// <summary>
9898
/// Enables or disables automatic backpressure handling. When enabled, the SDK will monitor system health and
@@ -1280,7 +1280,7 @@ public StackTraceMode StackTraceMode
12801280
/// <summary>
12811281
/// Delegate which is used to check whether the application crashed during last run.
12821282
/// </summary>
1283-
public Func<bool>? CrashedLastRun { get; set; }
1283+
internal Func<bool>? CrashedLastRun { get; set; }
12841284

12851285
#if IOS || MACCATALYST
12861286
// this event currently isn't being pushed from Android

‎test/Sentry.Extensions.Logging.Tests/SentryLoggingOptionsSetupTests.cs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ public void Configure_BindsConfigurationToOptions()
1313
var expected = new SentryLoggingOptions
1414
{
1515
IsGlobalModeEnabled = true,
16-
EnableScopeSync = true,
1716
TagFilters = new List<StringOrRegex> { "tag1", "tag2" },
1817
SendDefaultPii = true,
1918
IsEnvironmentUser = true,
@@ -61,7 +60,6 @@ public void Configure_BindsConfigurationToOptions()
6160
.AddInMemoryCollection(new Dictionary<string, string>
6261
{
6362
["IsGlobalModeEnabled"] = expected.IsGlobalModeEnabled.ToString(),
64-
["EnableScopeSync"] = expected.EnableScopeSync.ToString(),
6563
["TagFilters:0"] = expected.TagFilters.First().ToString(),
6664
["TagFilters:1"] = expected.TagFilters.Last().ToString(),
6765
["SendDefaultPii"] = expected.SendDefaultPii.ToString(),
@@ -122,7 +120,6 @@ public void Configure_BindsConfigurationToOptions()
122120
using (new AssertionScope())
123121
{
124122
actual.IsGlobalModeEnabled.Should().Be(expected.IsGlobalModeEnabled);
125-
actual.EnableScopeSync.Should().Be(expected.EnableScopeSync);
126123
actual.TagFilters.Should().BeEquivalentTo(expected.TagFilters);
127124
actual.SendDefaultPii.Should().Be(expected.SendDefaultPii);
128125
actual.IsEnvironmentUser.Should().Be(expected.IsEnvironmentUser);

‎test/Sentry.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,6 @@ namespace Sentry
825825
public string? CacheDirectoryPath { get; set; }
826826
public bool CaptureFailedRequests { get; set; }
827827
public System.Action<System.Net.Http.HttpClient>? ConfigureClient { get; set; }
828-
public System.Func<bool>? CrashedLastRun { get; set; }
829828
public System.Func<System.Net.Http.HttpMessageHandler>? CreateHttpMessageHandler { get; set; }
830829
public bool Debug { get; set; }
831830
public System.Net.DecompressionMethods DecompressionMethods { get; set; }
@@ -845,7 +844,6 @@ namespace Sentry
845844
[System.Obsolete("Metrics are always enabled. This option is ignored and will be removed in version" +
846845
" 7.0.0. To drop metrics, use SetBeforeSendMetric and return null.")]
847846
public bool EnableMetrics { get; set; }
848-
public bool EnableScopeSync { get; set; }
849847
public bool EnableSpotlight { get; set; }
850848
public string? Environment { get; set; }
851849
public System.Collections.Generic.IList<Sentry.HttpStatusCodeRange> FailedRequestStatusCodes { get; set; }
@@ -870,7 +868,6 @@ namespace Sentry
870868
public bool RequestBodyCompressionBuffered { get; set; }
871869
public System.IO.Compression.CompressionLevel RequestBodyCompressionLevel { get; set; }
872870
public float? SampleRate { get; set; }
873-
public Sentry.IScopeObserver? ScopeObserver { get; set; }
874871
public bool SendClientReports { get; set; }
875872
public bool SendDefaultPii { get; set; }
876873
public Sentry.ISentryScopeStateProcessor SentryScopeStateProcessor { get; set; }

‎test/Sentry.Tests/ApiApprovalTests.Run.DotNet11_0.verified.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,6 @@ namespace Sentry
825825
public string? CacheDirectoryPath { get; set; }
826826
public bool CaptureFailedRequests { get; set; }
827827
public System.Action<System.Net.Http.HttpClient>? ConfigureClient { get; set; }
828-
public System.Func<bool>? CrashedLastRun { get; set; }
829828
public System.Func<System.Net.Http.HttpMessageHandler>? CreateHttpMessageHandler { get; set; }
830829
public bool Debug { get; set; }
831830
public System.Net.DecompressionMethods DecompressionMethods { get; set; }
@@ -845,7 +844,6 @@ namespace Sentry
845844
[System.Obsolete("Metrics are always enabled. This option is ignored and will be removed in version" +
846845
" 7.0.0. To drop metrics, use SetBeforeSendMetric and return null.")]
847846
public bool EnableMetrics { get; set; }
848-
public bool EnableScopeSync { get; set; }
849847
public bool EnableSpotlight { get; set; }
850848
public string? Environment { get; set; }
851849
public System.Collections.Generic.IList<Sentry.HttpStatusCodeRange> FailedRequestStatusCodes { get; set; }
@@ -870,7 +868,6 @@ namespace Sentry
870868
public bool RequestBodyCompressionBuffered { get; set; }
871869
public System.IO.Compression.CompressionLevel RequestBodyCompressionLevel { get; set; }
872870
public float? SampleRate { get; set; }
873-
public Sentry.IScopeObserver? ScopeObserver { get; set; }
874871
public bool SendClientReports { get; set; }
875872
public bool SendDefaultPii { get; set; }
876873
public Sentry.ISentryScopeStateProcessor SentryScopeStateProcessor { get; set; }

‎test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,6 @@ namespace Sentry
825825
public string? CacheDirectoryPath { get; set; }
826826
public bool CaptureFailedRequests { get; set; }
827827
public System.Action<System.Net.Http.HttpClient>? ConfigureClient { get; set; }
828-
public System.Func<bool>? CrashedLastRun { get; set; }
829828
public System.Func<System.Net.Http.HttpMessageHandler>? CreateHttpMessageHandler { get; set; }
830829
public bool Debug { get; set; }
831830
public System.Net.DecompressionMethods DecompressionMethods { get; set; }
@@ -845,7 +844,6 @@ namespace Sentry
845844
[System.Obsolete("Metrics are always enabled. This option is ignored and will be removed in version" +
846845
" 7.0.0. To drop metrics, use SetBeforeSendMetric and return null.")]
847846
public bool EnableMetrics { get; set; }
848-
public bool EnableScopeSync { get; set; }
849847
public bool EnableSpotlight { get; set; }
850848
public string? Environment { get; set; }
851849
public System.Collections.Generic.IList<Sentry.HttpStatusCodeRange> FailedRequestStatusCodes { get; set; }
@@ -870,7 +868,6 @@ namespace Sentry
870868
public bool RequestBodyCompressionBuffered { get; set; }
871869
public System.IO.Compression.CompressionLevel RequestBodyCompressionLevel { get; set; }
872870
public float? SampleRate { get; set; }
873-
public Sentry.IScopeObserver? ScopeObserver { get; set; }
874871
public bool SendClientReports { get; set; }
875872
public bool SendDefaultPii { get; set; }
876873
public Sentry.ISentryScopeStateProcessor SentryScopeStateProcessor { get; set; }

‎test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,6 @@ namespace Sentry
825825
public string? CacheDirectoryPath { get; set; }
826826
public bool CaptureFailedRequests { get; set; }
827827
public System.Action<System.Net.Http.HttpClient>? ConfigureClient { get; set; }
828-
public System.Func<bool>? CrashedLastRun { get; set; }
829828
public System.Func<System.Net.Http.HttpMessageHandler>? CreateHttpMessageHandler { get; set; }
830829
public bool Debug { get; set; }
831830
public System.Net.DecompressionMethods DecompressionMethods { get; set; }
@@ -845,7 +844,6 @@ namespace Sentry
845844
[System.Obsolete("Metrics are always enabled. This option is ignored and will be removed in version" +
846845
" 7.0.0. To drop metrics, use SetBeforeSendMetric and return null.")]
847846
public bool EnableMetrics { get; set; }
848-
public bool EnableScopeSync { get; set; }
849847
public bool EnableSpotlight { get; set; }
850848
public string? Environment { get; set; }
851849
public System.Collections.Generic.IList<Sentry.HttpStatusCodeRange> FailedRequestStatusCodes { get; set; }
@@ -870,7 +868,6 @@ namespace Sentry
870868
public bool RequestBodyCompressionBuffered { get; set; }
871869
public System.IO.Compression.CompressionLevel RequestBodyCompressionLevel { get; set; }
872870
public float? SampleRate { get; set; }
873-
public Sentry.IScopeObserver? ScopeObserver { get; set; }
874871
public bool SendClientReports { get; set; }
875872
public bool SendDefaultPii { get; set; }
876873
public Sentry.ISentryScopeStateProcessor SentryScopeStateProcessor { get; set; }

‎test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,6 @@ namespace Sentry
812812
public string? CacheDirectoryPath { get; set; }
813813
public bool CaptureFailedRequests { get; set; }
814814
public System.Action<System.Net.Http.HttpClient>? ConfigureClient { get; set; }
815-
public System.Func<bool>? CrashedLastRun { get; set; }
816815
public System.Func<System.Net.Http.HttpMessageHandler>? CreateHttpMessageHandler { get; set; }
817816
public bool Debug { get; set; }
818817
public System.Net.DecompressionMethods DecompressionMethods { get; set; }
@@ -832,7 +831,6 @@ namespace Sentry
832831
[System.Obsolete("Metrics are always enabled. This option is ignored and will be removed in version" +
833832
" 7.0.0. To drop metrics, use SetBeforeSendMetric and return null.")]
834833
public bool EnableMetrics { get; set; }
835-
public bool EnableScopeSync { get; set; }
836834
public bool EnableSpotlight { get; set; }
837835
public string? Environment { get; set; }
838836
public System.Collections.Generic.IList<Sentry.HttpStatusCodeRange> FailedRequestStatusCodes { get; set; }
@@ -857,7 +855,6 @@ namespace Sentry
857855
public bool RequestBodyCompressionBuffered { get; set; }
858856
public System.IO.Compression.CompressionLevel RequestBodyCompressionLevel { get; set; }
859857
public float? SampleRate { get; set; }
860-
public Sentry.IScopeObserver? ScopeObserver { get; set; }
861858
public bool SendClientReports { get; set; }
862859
public bool SendDefaultPii { get; set; }
863860
public Sentry.ISentryScopeStateProcessor SentryScopeStateProcessor { get; set; }

0 commit comments

Comments
 (0)