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

Fix: Rename IUserFactory to ISentryUserFactory #10062

Merged
merged 1 commit into from
May 16, 2024
Merged
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
6 changes: 3 additions & 3 deletions docs/platforms/dotnet/guides/aspnetcore/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,18 @@ The lifetime used will be respected by the SDK. For example, when registering a

When opting-in to [SendDefaultPii](#senddefaultpii), the SDK will automatically read the user from the request by inspecting `HttpContext.User`. Default claim values like `NameIdentifier` for the _Id_ will be used.

If you wish to change the behavior of how to read the user from the request, you can register a new `IUserFactory` into the container:
If you wish to change the behavior of how to read the user from the request, you can register a new `ISentryUserFactory` into the container:

```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<IUserFactory, MyUserFactory>();
services.AddSingleton<ISentryUserFactory, MyUserFactory>();
}
```

```fsharp
member this.ConfigureServices(services: IServiceCollection) =
services.AddSingleton<IUserFactory, MyUserFactory>() |> ignore
services.AddSingleton<ISentryUserFactory, MyUserFactory>() |> ignore
```

### Adding event and exception processors
Expand Down
Loading