Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Fix issues with Jaeger running on .NET Framework #213

Merged
merged 1 commit into from
May 27, 2021

Conversation

Falco20019
Copy link
Collaborator

@Falco20019 Falco20019 commented May 27, 2021

Which problem is this PR solving?

Short description of the changes

  • Updated ApacheThrift to 0.14
  • Updated Microsoft.Extensions.Logging.Abstractions to 3.1
  • Resolves dependency resolution between .NET Standard and .NET Framework

Signed-off-by: Kraemer, Benjamin <falco20019@hotmail.com>
@@ -13,6 +16,10 @@ public class AutofacConfig

static AutofacConfig()
{
// This is necessary to pick the correct sender, otherwise a NoopSender is used!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't seem related to the PR directly, is this just an oversight from the previous resolver refactoring?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, oversight from when we split up the packages. Since most people either use the NetCore package for ASP.NET (which has it‘s own example over there) or directly the configure options as in the main readme, nobody recognized.

@@ -30,10 +33,16 @@ public void ConfigureServices(IServiceCollection services)
// Adds the Jaeger Tracer.
services.AddSingleton<ITracer>(serviceProvider =>
{
string serviceName = serviceProvider.GetRequiredService<IWebHostEnvironment>().ApplicationName;
var serviceName = serviceProvider.GetRequiredService<IWebHostEnvironment>().ApplicationName;
var loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious, if .net already has this mechanism of service providers, why did we need a custom SenderConfiguration.DefaultSenderResolver? Couldn't we register ThriftSenderFactory with service provider?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That‘s only for ASP.NET (website stuff), but not for Desktop or Console applications. There are some dependency injection frameworks available, but I didn‘t want to force users to use one, since there is no gold standard.

@Falco20019 Falco20019 merged commit 9d4debc into master May 27, 2021
@Falco20019 Falco20019 deleted the Falco20019/update-thrift branch May 27, 2021 17:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants