question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hooking into IWebHostBuilder

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jskeetcommented, Sep 28, 2020

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.

0reactions
bruno-garciacommented, Sep 27, 2020

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found