Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ISentryUserFactory public #2719

Merged
merged 2 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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