Skip to content

Commit

Permalink
Make ISentryUserFactory public (#2719)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescrosswell authored Oct 12, 2023
1 parent d8f293e commit a8b8184
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- ISentryUserFactory is now public so users can register their own implementations via DI ([#2719](https://github.com/getsentry/sentry-dotnet/pull/2719))

## 3.40.0

### Obsoletion
Expand All @@ -12,6 +18,7 @@
- Release of Azure Functions (Isolated Worker/Out-of-Process) support ([#2686](https://github.com/getsentry/sentry-dotnet/pull/2686))

### Fixes

- Scope is now correctly applied to Transactions when using OpenTelemetry on ASP.NET Core ([#2690](https://github.com/getsentry/sentry-dotnet/pull/2690))

### Dependencies
Expand Down
9 changes: 8 additions & 1 deletion src/Sentry/ISentryUserFactory.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
namespace Sentry;

internal interface ISentryUserFactory
/// <summary>
/// Sentry User Factory
/// </summary>
public interface ISentryUserFactory
{
/// <summary>
/// Creates a Sentry <see cref="User"/> representing the current principal.
/// </summary>
/// <returns>The protocol user</returns>
public User? Create();
}
4 changes: 4 additions & 0 deletions test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ namespace Sentry
{
void Apply(Sentry.Scope scope, object state);
}
public interface ISentryUserFactory
{
Sentry.User? Create();
}
public interface ISession
{
string? DistinctId { get; }
Expand Down
4 changes: 4 additions & 0 deletions test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ namespace Sentry
{
void Apply(Sentry.Scope scope, object state);
}
public interface ISentryUserFactory
{
Sentry.User? Create();
}
public interface ISession
{
string? DistinctId { get; }
Expand Down
4 changes: 4 additions & 0 deletions test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ namespace Sentry
{
void Apply(Sentry.Scope scope, object state);
}
public interface ISentryUserFactory
{
Sentry.User? Create();
}
public interface ISession
{
string? DistinctId { get; }
Expand Down
4 changes: 4 additions & 0 deletions test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ namespace Sentry
{
void Apply(Sentry.Scope scope, object state);
}
public interface ISentryUserFactory
{
Sentry.User? Create();
}
public interface ISession
{
string? DistinctId { get; }
Expand Down

0 comments on commit a8b8184

Please sign in to comment.