Hooking into IWebHostBuilder
See original GitHub issueI’m giving a try to extend this package in order to add Sentry support.
Our current hook on ASP.NET Core is over IWebHostBuilder
with UseSentry
.
For what I could see so far, the Startup
we can plug in only exposes ConfigureServices
and Configure
. Is there a way to hook into IWebHostBuilder
or is it planned to be added? Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
how to access Configuration in a IWebHostBuilder extension
var config = new ConfigurationBuilder() . AddEnvironmentVariables() . Build(); var host = new WebHostBuilder() . UseConfiguration(config) .
Read more >IWebHostBuilder Interface (Microsoft.AspNetCore.Hosting)
Configures application to use Azure AppServices integration. CaptureStartupErrors(IWebHostBuilder, Boolean). Set whether startup errors should be captured in ...
Read more >Converting integration tests to .NET Core 3.0
Hook up the xUnit log provider using an ITestOutputHelper property. To use the ExampleAppTestFixture in a test, you must implement the ...
Read more >ASP.NET Core — Autofac 7.0.0 documentation
MVC and Web API are one thing. There used to be different ways to hook into DI based on whether you were using...
Read more >NET Core | APM .NET Agent Reference [1.x]
On .NET Core, the agent can be registered on the IHostBuilder . ... you can use the startup hook feature to inject the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m so pleased it works - looks great from a consumer perspective, too. It’s so nice to see an actual integration in the way I’d envisaged. Thanks so much for your work on this.
That makes sense, thanks for the detailed explanation!
Lukily I didn’t have to go the route of the
EntryPoint
.I just gave it a try with the
FunctionsStartup
and it plugged in really well on top of the existent ASP.NET Core integration. It’s a draft but it can show what this could look like.Here’s what the consumer would look like.
And finally what we can capture from that crash..
I’m closing this issue since from my perspective the current hook is great!