Skip to content

Commit 2eeea63

Browse files
committed
Ignore 90% of project config traces
1 parent 8ca4f2e commit 2eeea63

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Exceptionless.Web/ApmExtensions.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ public static IHostBuilder AddApm(this IHostBuilder builder, ApmConfig config)
9494
if (config.MinDurationMs > 0 && activity.Duration < TimeSpan.FromMilliseconds(config.MinDurationMs))
9595
return false;
9696

97+
if (activity.GetTagItem("http.route") is string httpRoute)
98+
{
99+
// only capture 10% of config requests
100+
if (httpRoute == "api/v2/projects/config")
101+
return Random.Shared.Next(100) > 90;
102+
}
103+
97104
if (activity is { DisplayName: "LLEN", Parent: null })
98105
return false;
99106

0 commit comments

Comments
 (0)