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

Monitor Blazor Server circuit activity #28983

Merged
merged 5 commits into from
Apr 26, 2023

Conversation

guardrex
Copy link
Collaborator

@guardrex guardrex commented Apr 14, 2023

Fixes #28982

Mackinnon ... this looks like your bits. Half the time, I'll get the PU assignment via Artak. On this one, I think he'll ask you to look. This comes right from Dan's blog post, so it's probably ok as a basic guide. Are there more feature nits and bits that we need to discuss here?

https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-3/#monitor-blazor-server-circuit-activity


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/fundamentals/dependency-injection.md ASP.NET Core Blazor dependency injection
aspnetcore/blazor/fundamentals/signalr.md ASP.NET Core Blazor SignalR guidance
aspnetcore/blazor/security/server/additional-scenarios.md ASP.NET Core Blazor Server additional security scenarios

@guardrex guardrex self-assigned this Apr 14, 2023
Copy link
Member

@MackinnonBuck MackinnonBuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Just a small suggestion.

I don't think there's anything else this PR needs to cover 🙂

aspnetcore/blazor/fundamentals/signalr.md Outdated Show resolved Hide resolved
@guardrex
Copy link
Collaborator Author

guardrex commented Apr 17, 2023

@MackinnonBuck ... I think we have a bit more to look at and resolve on this one.

Two things leap out now that I know what "there's an existing pattern for accessing circuit-scoped services" was referring to.

I've updated the PR for the following, but you'll need to look and see if iNsAnItY 😵 has taken over the small 🦖🧠...

  1. Although it's the same approach, the content and examples probably should be grouped with their subject matter and cross-linked ...

    • The SignalR topic has Monitor circuit activity (Blazor Server) with its IdleCircuitHandler example.
    • The DI topic has Access Blazor services from a different DI scope with its CircuitServicesAccessor example.
    • The Blazor Server Additional scenarios topic has Access AuthenticationStateProvider in outgoing request middleware with its AuthenticationStateHandler example.
  2. The first two additions, SignalR and DI examples, seem straightforward. However, the third is something that I have less familiarity with because I spend much of my time in auth scenarios for the WASM hosting model and not implementing DelegatingHandler for Blazor Server apps. AFAICT, the AuthenticationStateHandler is for outgoing middleware request processing, as I have on the PR now, but I could be totally off base on that use case. I hacked up a complete example of it by making it create a custom header for the authenticated user's name. If that is incorrect, what's the use case and what is the complete example for it?

If you want to look at the published previews, they can be reached with the following links (these link directly to the sections) ...

@guardrex guardrex requested a review from danroth27 April 20, 2023 16:07
@guardrex
Copy link
Collaborator Author

@MackinnonBuck ... I think you should take a look at the updated layout. I'm primarily concerned about item 2 above ☝️. I may have guessed correctly on the implementation of the AuthenticationStateHandler, but I think u should confirm if I went the right way.

@MackinnonBuck
Copy link
Member

@guardrex I think the updated layout looks great. Regarding the AuthenticationStateHandler example, I wonder if we could get @javiercn's opinion on that. Javier, what do you think? Do we need a full example for this, or can we assume that if a customer needs this, they already have a specific scenario in mind?

@guardrex
Copy link
Collaborator Author

Thanks @MackinnonBuck ... I like what I wrote (and the example) in the Access AuthenticationStateProvider in outgoing request middleware section. If it's good, I hope we can keep it. I think 🤔 it works ..... maybe 🤣 ... the 🙏 server gods 🙏 hopefully will smile on that coverage.

@danroth27 danroth27 requested a review from javiercn April 26, 2023 16:29
@guardrex
Copy link
Collaborator Author

guardrex commented Apr 26, 2023

Thanks @javiercn.

@danroth27 ... awaiting final sign-off.

MERGING NOW! 🏃

@guardrex guardrex merged commit a1444dc into main Apr 26, 2023
@guardrex guardrex deleted the guardrex/monitor-blazor-circuit-activity branch April 26, 2023 16:57
Donciavas pushed a commit to Donciavas/AspNetCore.Docs that referenced this pull request Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Monitor Blazor Server circuit activity
3 participants