diff --git a/src/Exceptionless.Web/ApmExtensions.cs b/src/Exceptionless.Web/ApmExtensions.cs index c17cd3da8..fd15c4fb0 100644 --- a/src/Exceptionless.Web/ApmExtensions.cs +++ b/src/Exceptionless.Web/ApmExtensions.cs @@ -94,6 +94,13 @@ public static IHostBuilder AddApm(this IHostBuilder builder, ApmConfig config) if (config.MinDurationMs > 0 && activity.Duration < TimeSpan.FromMilliseconds(config.MinDurationMs)) return false; + if (activity.GetTagItem("http.route") is string httpRoute) + { + // only capture 10% of config requests + if (httpRoute == "api/v2/projects/config") + return Random.Shared.Next(100) > 90; + } + if (activity is { DisplayName: "LLEN", Parent: null }) return false;