Skip to content

Commit ac5b47b

Browse files
ScopeExtensions.Populate is now internal (#4611)
1 parent 6377b49 commit ac5b47b

File tree

5 files changed

+4
-18
lines changed

5 files changed

+4
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- SentryOptions.IsEnvironmentUser now defaults to false on MAUI. The means the User.Name will no longer be set, by default, to the name of the device ([#4606](https://github.com/getsentry/sentry-dotnet/pull/4606))
88
- Remove unnecessary files from SentryCocoaFramework before packing ([#4602](https://github.com/getsentry/sentry-dotnet/pull/4602))
9+
- ScopeExtensions.Populate is now internal ([#4611](https://github.com/getsentry/sentry-dotnet/pull/4611))
910

1011
### Fixes
1112

src/Sentry.AspNetCore/ScopeExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Sentry.AspNetCore;
1313
/// Scope Extensions
1414
/// </summary>
1515
[EditorBrowsable(EditorBrowsableState.Never)]
16-
public static class ScopeExtensions
16+
internal static class ScopeExtensions
1717
{
1818
/// <summary>
1919
/// Populates the scope with the HTTP data
@@ -22,7 +22,7 @@ public static class ScopeExtensions
2222
/// NOTE: The scope is applied to the event BEFORE running the event processors/exception processors.
2323
/// The main Sentry SDK has processors which run right before any additional processors to the Event
2424
/// </remarks>
25-
public static void Populate(this Scope scope, HttpContext context, SentryAspNetCoreOptions options)
25+
internal static void Populate(this Scope scope, HttpContext context, SentryAspNetCoreOptions options)
2626
{
2727
// Not to throw on code that ignores nullability warnings.
2828
if (scope.IsNull() || context.IsNull() || options.IsNull())
@@ -190,7 +190,7 @@ private static void SetBody(Scope scope, HttpContext context, SentryAspNetCoreOp
190190
/// </summary>
191191
/// <param name="scope">The scope.</param>
192192
/// <param name="activity">The activity.</param>
193-
public static void Populate(this Scope scope, Activity activity)
193+
internal static void Populate(this Scope scope, Activity activity)
194194
{
195195
// Not to throw on code that ignores nullability warnings.
196196
if (scope.IsNull() || activity.IsNull())

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ namespace Sentry.AspNetCore
3939
public static string? TryGetHttpPath(this Sentry.TransactionSamplingContext samplingContext) { }
4040
public static string? TryGetHttpRoute(this Sentry.TransactionSamplingContext samplingContext) { }
4141
}
42-
public static class ScopeExtensions
43-
{
44-
public static void Populate(this Sentry.Scope scope, System.Diagnostics.Activity activity) { }
45-
public static void Populate(this Sentry.Scope scope, Microsoft.AspNetCore.Http.HttpContext context, Sentry.AspNetCore.SentryAspNetCoreOptions options) { }
46-
}
4742
[Microsoft.Extensions.Logging.ProviderAlias("Sentry")]
4843
public class SentryAspNetCoreLoggerProvider : Sentry.Extensions.Logging.SentryLoggerProvider
4944
{

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ namespace Sentry.AspNetCore
3939
public static string? TryGetHttpPath(this Sentry.TransactionSamplingContext samplingContext) { }
4040
public static string? TryGetHttpRoute(this Sentry.TransactionSamplingContext samplingContext) { }
4141
}
42-
public static class ScopeExtensions
43-
{
44-
public static void Populate(this Sentry.Scope scope, System.Diagnostics.Activity activity) { }
45-
public static void Populate(this Sentry.Scope scope, Microsoft.AspNetCore.Http.HttpContext context, Sentry.AspNetCore.SentryAspNetCoreOptions options) { }
46-
}
4742
[Microsoft.Extensions.Logging.ProviderAlias("Sentry")]
4843
public class SentryAspNetCoreLoggerProvider : Sentry.Extensions.Logging.SentryLoggerProvider
4944
{

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ namespace Sentry.AspNetCore
3939
public static string? TryGetHttpPath(this Sentry.TransactionSamplingContext samplingContext) { }
4040
public static string? TryGetHttpRoute(this Sentry.TransactionSamplingContext samplingContext) { }
4141
}
42-
public static class ScopeExtensions
43-
{
44-
public static void Populate(this Sentry.Scope scope, System.Diagnostics.Activity activity) { }
45-
public static void Populate(this Sentry.Scope scope, Microsoft.AspNetCore.Http.HttpContext context, Sentry.AspNetCore.SentryAspNetCoreOptions options) { }
46-
}
4742
[Microsoft.Extensions.Logging.ProviderAlias("Sentry")]
4843
public class SentryAspNetCoreLoggerProvider : Sentry.Extensions.Logging.SentryLoggerProvider
4944
{

0 commit comments

Comments
 (0)