diff --git a/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs b/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs index 539aef2..a36b59b 100644 --- a/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs +++ b/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs @@ -29,10 +29,13 @@ public static class DependencyInjectionExtensions private static IServiceCollection AddMiscellaneousServices(this IServiceCollection services) { - var assemblyName = Assembly.GetExecutingAssembly() + services.AddSingleton(sp => + { + var assemblyName = Assembly.GetExecutingAssembly() .GetName() .Name ?? "Vegasco.Server.Api"; - services.AddSingleton(new ActivitySource(assemblyName)); + return new ActivitySource(assemblyName); + }); services.AddResponseCompression(); diff --git a/src/Vegasco.Server.AppHost.Shared/Constants.cs b/src/Vegasco.Server.AppHost.Shared/Constants.cs index 9c1dc4c..74e2769 100644 --- a/src/Vegasco.Server.AppHost.Shared/Constants.cs +++ b/src/Vegasco.Server.AppHost.Shared/Constants.cs @@ -4,7 +4,7 @@ public static class Constants { public static class Projects { - public const string Api = "Vegasco_Server_Api"; + public const string Api = "Vegasco.Server.Api"; } public static class Database