You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since .NET 7, the preferred use of the generic host has been first to create a HostApplicationBuilder, which implements IHostApplicationBuilder, from the static method on the Host type. e.g.
We do not currently provide extension methods to support the registration of the APM agent.
It's possible to work around this by manually creating an APM instance (although that won't include hooks such as integrating with the logging extensions) or switching to the older (no longer preferred) Host.CreateDefaultBuilder style code instead.
Implementing the current behaviour is complicated since the new flow doesn't expose an intermediate IServiceProvider.
A further scenario we should consider is enabling APM in .NET Maui apps, which use the MauiAppBuilder.
We should likely provide an IServiceCollection extension method to enable APM.
The text was updated successfully, but these errors were encountered:
Since .NET 7, the preferred use of the generic host has been first to create a
HostApplicationBuilder
, which implementsIHostApplicationBuilder
, from the static method on theHost
type. e.g.We do not currently provide extension methods to support the registration of the APM agent.
It's possible to work around this by manually creating an APM instance (although that won't include hooks such as integrating with the logging extensions) or switching to the older (no longer preferred)
Host.CreateDefaultBuilder
style code instead.Implementing the current behaviour is complicated since the new flow doesn't expose an intermediate
IServiceProvider
.A further scenario we should consider is enabling APM in .NET Maui apps, which use the
MauiAppBuilder
.We should likely provide an
IServiceCollection
extension method to enable APM.The text was updated successfully, but these errors were encountered: