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

ApplicationInsights sink doesn't work if you explicitly install serilog.sinks.ApplicationInsights v4 #469

Closed
sandernaert opened this issue Oct 10, 2022 · 4 comments · Fixed by #474
Assignees
Labels
application-insights All issues related to Azure Application Insights serilog All issues related to Serilog
Milestone

Comments

@sandernaert
Copy link

Describe the bug

Arcus.Observability.Telemetry.Serilog.Sinks.ApplicationInsights doesn't work with Serilog.Sinks.ApplicationInsights

System.TypeLoadException: Could not load type 'Serilog.Sinks.ApplicationInsights.Sinks.ApplicationInsights.TelemetryConverters.TelemetryConverterBase' from assembly 'Serilog.Sinks.ApplicationInsights, Version=4.0.0.0

To Reproduce
Just install latest package of the arcus package and install serilog.sinks.applicationinsights 4.0

Expected behavior
Things to work

Additional context
Serilog fixed the namespaces to be more logical in v4.0
serilog-contrib/serilog-sinks-applicationinsights@8e4e26a

@stijnmoreels
Copy link
Member

stijnmoreels commented Oct 10, 2022

Hey, thx for the issue.
We could update the Serilog.Sinks.ApplicationInsights package in the Arcus.Observability.Telemetry.Serilog.Sinks.ApplicationInsights so that the fixed namespaces are present, right, @fgheysels ?

@stijnmoreels stijnmoreels modified the milestones: v2.6.0, v2.7.0 Oct 10, 2022
@stijnmoreels stijnmoreels added application-insights All issues related to Azure Application Insights serilog All issues related to Serilog labels Oct 10, 2022
@fgheysels
Copy link
Member

fgheysels commented Oct 13, 2022

Just for my understanding:

  • You've installed the latest version Arcus.Observability.Serilog.Sinks.applicaitonInsights (which has a dependency on Serilog.Sinks.ApplicationInsights v3.1.0)
  • You've additionally installed Serilog.Sinks.ApplicationInsights v4.0 so that an issue with Serilog is fixed

that leads to the error you encounter?

Indeed @stijnmoreels , we can update the Serilog package in Arcus.
Of course, as is obvious from the versioning of the Serilog package, there might be breaking changes applicable to the Arcus component.

@stijnmoreels
Copy link
Member

You want to take this up, @sandernaert ?

@sandernaert
Copy link
Author

versioning

Not exactly. I had a solution that already used Serilog.Sinks.ApplicationInsights v4.0, then I decided to use the Arcus library and noticed that it didn't work. I could solve it by just removing the serilog package.

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 serilog All issues related to Serilog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants