Updated for .NET 8! you can add filter when you create Logger:
using var log = new LoggerConfiguration() .Filter.ByExcluding(Matching.WithProperty<string>("RequestPath", p => p.StartsWith("/health"))) .WriteTo.Console() .CreateLogger();