diff --git a/CHANGELOG.md b/CHANGELOG.md
index bf9d652035..c53d888330 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
## Unreleased
- Remove unnecessary files from SentryCocoaFramework before packing ([#4602](https://github.com/getsentry/sentry-dotnet/pull/4602))
+- ScopeExtensions.Populate is now internal ([#4611](https://github.com/getsentry/sentry-dotnet/pull/4611))
## 6.0.0-preview.1
diff --git a/src/Sentry.AspNetCore/ScopeExtensions.cs b/src/Sentry.AspNetCore/ScopeExtensions.cs
index 10ed791335..81ce09d421 100644
--- a/src/Sentry.AspNetCore/ScopeExtensions.cs
+++ b/src/Sentry.AspNetCore/ScopeExtensions.cs
@@ -13,7 +13,7 @@ namespace Sentry.AspNetCore;
/// Scope Extensions
///
[EditorBrowsable(EditorBrowsableState.Never)]
-public static class ScopeExtensions
+internal static class ScopeExtensions
{
///
/// Populates the scope with the HTTP data
@@ -22,7 +22,7 @@ public static class ScopeExtensions
/// NOTE: The scope is applied to the event BEFORE running the event processors/exception processors.
/// The main Sentry SDK has processors which run right before any additional processors to the Event
///
- public static void Populate(this Scope scope, HttpContext context, SentryAspNetCoreOptions options)
+ internal static void Populate(this Scope scope, HttpContext context, SentryAspNetCoreOptions options)
{
// Not to throw on code that ignores nullability warnings.
if (scope.IsNull() || context.IsNull() || options.IsNull())
@@ -190,7 +190,7 @@ private static void SetBody(Scope scope, HttpContext context, SentryAspNetCoreOp
///
/// The scope.
/// The activity.
- public static void Populate(this Scope scope, Activity activity)
+ internal static void Populate(this Scope scope, Activity activity)
{
// Not to throw on code that ignores nullability warnings.
if (scope.IsNull() || activity.IsNull())
diff --git a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt
index 5f9eab70e9..4ca83a4f8f 100644
--- a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt
+++ b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt
@@ -39,11 +39,6 @@ namespace Sentry.AspNetCore
public static string? TryGetHttpPath(this Sentry.TransactionSamplingContext samplingContext) { }
public static string? TryGetHttpRoute(this Sentry.TransactionSamplingContext samplingContext) { }
}
- public static class ScopeExtensions
- {
- public static void Populate(this Sentry.Scope scope, System.Diagnostics.Activity activity) { }
- public static void Populate(this Sentry.Scope scope, Microsoft.AspNetCore.Http.HttpContext context, Sentry.AspNetCore.SentryAspNetCoreOptions options) { }
- }
[Microsoft.Extensions.Logging.ProviderAlias("Sentry")]
public class SentryAspNetCoreLoggerProvider : Sentry.Extensions.Logging.SentryLoggerProvider
{
diff --git a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
index 5f9eab70e9..4ca83a4f8f 100644
--- a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
+++ b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
@@ -39,11 +39,6 @@ namespace Sentry.AspNetCore
public static string? TryGetHttpPath(this Sentry.TransactionSamplingContext samplingContext) { }
public static string? TryGetHttpRoute(this Sentry.TransactionSamplingContext samplingContext) { }
}
- public static class ScopeExtensions
- {
- public static void Populate(this Sentry.Scope scope, System.Diagnostics.Activity activity) { }
- public static void Populate(this Sentry.Scope scope, Microsoft.AspNetCore.Http.HttpContext context, Sentry.AspNetCore.SentryAspNetCoreOptions options) { }
- }
[Microsoft.Extensions.Logging.ProviderAlias("Sentry")]
public class SentryAspNetCoreLoggerProvider : Sentry.Extensions.Logging.SentryLoggerProvider
{
diff --git a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
index 5f9eab70e9..4ca83a4f8f 100644
--- a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
+++ b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
@@ -39,11 +39,6 @@ namespace Sentry.AspNetCore
public static string? TryGetHttpPath(this Sentry.TransactionSamplingContext samplingContext) { }
public static string? TryGetHttpRoute(this Sentry.TransactionSamplingContext samplingContext) { }
}
- public static class ScopeExtensions
- {
- public static void Populate(this Sentry.Scope scope, System.Diagnostics.Activity activity) { }
- public static void Populate(this Sentry.Scope scope, Microsoft.AspNetCore.Http.HttpContext context, Sentry.AspNetCore.SentryAspNetCoreOptions options) { }
- }
[Microsoft.Extensions.Logging.ProviderAlias("Sentry")]
public class SentryAspNetCoreLoggerProvider : Sentry.Extensions.Logging.SentryLoggerProvider
{