Use custom activity source

This commit is contained in:
2025-06-12 19:12:38 +02:00
parent b28bd2826b
commit ada0e2f665
2 changed files with 24 additions and 11 deletions

View File

@@ -2,6 +2,8 @@
using FluentValidation;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.Extensions.Options;
using System.Diagnostics;
using System.Reflection;
using Vegasco.Server.Api.Authentication;
using Vegasco.Server.Api.Common;
using Vegasco.Server.Api.Persistence;
@@ -27,6 +29,11 @@ public static class DependencyInjectionExtensions
private static IServiceCollection AddMiscellaneousServices(this IServiceCollection services)
{
var assemblyName = Assembly.GetExecutingAssembly()
.GetName()
.Name ?? "Vegasco.Server.Api";
services.AddSingleton(new ActivitySource(assemblyName));
services.AddResponseCompression();
services.AddValidatorsFromAssemblies(