Closed dolly22 closed 3 years ago
Hey @dolly22 just so that you know, I have a potential fix for this. My opinion on it is that it was a bad design and I am willing to correct it. It will be released in a beta package soon alone with other changes but it will take a while to be stable enough before moving it out of beta.
Will you be able to use a beta package or will it a problem for you?
@xiaomi7732 Thank you, no problem with using beta package.
@dolly22 Just so that you know, the release of the beta package has been blocked by some other issues. We are looking into address those, it might take a while.
Feel free to let us know if you need this change in urgent and we will see how to priorities it. I don't have a concreate ETA yet.
Please try it out with https://www.nuget.org/packages/Microsoft.ApplicationInsights.Profiler.AspNetCore/2.3.0-beta2.
Profiler is not working when using different Autofac IoC container for Microsoft.Extensions.DependencyInjection.
The error is:
The problem is with
Microsoft.ApplicationInsights.Profiler.Core.UploaderProxy.TraceUploaderProxy
constructor signature, precisely with it's last parametercallUploadAsync
.It's possible to workaround the problem by overriding the offending DI registration later in Autofac container initialization, but both interface and implementing class are marked as internal and clearly not meant to be tampered with and also there is another problem with different implementation registration when using StandaloneMode.
Autofac registration workaround is something like this...
But it would be much cleaner to redesign
callUploadAsync
extension point to something more IoC container friendly so ServiceProfiler could be used with different IoC container directly.