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

InvalidOperation is thrown when calling RemoveMicrosoftApplicationInsightsLoggerProvider #441

Closed
fgheysels opened this issue Jul 19, 2022 · 5 comments · Fixed by #461
Closed
Assignees
Labels
application-insights All issues related to Azure Application Insights bug Something isn't working
Milestone

Comments

@fgheysels
Copy link
Member

Describe the bug
I've setup Arcus Observability logging in an Azure Function as described here.

However, when I run the project (locally), this exception is thrown:

image

I believe we should not throw an exception when the ApplicationInsightsLoggerProvider is not present when we call this method.
(As mentionned here).

@stijnmoreels
Copy link
Member

Hmm, yeah, that's not fun to have.
This was already an existing project? Bc this call is added to all our Azure Functions project templates without a problem. Maybe this is related to the target framework?

@stijnmoreels stijnmoreels added the bug Something isn't working label Jul 20, 2022
@stijnmoreels stijnmoreels added this to the v2.6.0 milestone Jul 20, 2022
@stijnmoreels stijnmoreels added the application-insights All issues related to Azure Application Insights label Jul 20, 2022
@fgheysels
Copy link
Member Author

It is a new Function, but I haven't created it using the Arcus template.
Target Framework is .NET 6

@stijnmoreels
Copy link
Member

It is a new Function, but I haven't created it using the Arcus template. Target Framework is .NET 6

Isolated Azure Functions are also not required to use this.

@fgheysels
Copy link
Member Author

fgheysels commented Aug 19, 2022

Weird, I cannot reproduce this anymore atm. But I have another issue ...
#453

@stijnmoreels
Copy link
Member

Aha, this is also not needed anymore for the newest Azure Functions SDK as it seems that the Microsoft ILoggerProvider that write to Application Insights is no longer there. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application-insights All issues related to Azure Application Insights bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants