Skip to content

Add IpAddressObfuscationUtil for use with client-side-stats#8418

Open
andrewlock wants to merge 7 commits intomasterfrom
andrew/client-side-stats/ip-obfuscation
Open

Add IpAddressObfuscationUtil for use with client-side-stats#8418
andrewlock wants to merge 7 commits intomasterfrom
andrew/client-side-stats/ip-obfuscation

Conversation

@andrewlock
Copy link
Copy Markdown
Member

Summary of changes

Adds the IpAddressObfuscationUtil helper for use by client-side stats

Reason for change

It's not part of the RFC, but the agent does quantization of IPaddresses, which could appear in peer tags (which are used for stats calculations). Without this quantization, we would end up with an explosion of buckets

Implementation details

Used 🤖 to port the implementation from the Go agent, including the tests. Then iterated on it repeatedly to try to bring the allocations down as low as possible.

⚠️ There's still one code path which is kinda nasty where we try to parse if the tag is a valid IP v6, as it causes an allocation on .NET Framework, but I couldn't find a way to avoid that. Given all the allocations we're going to get anyway, I think we will just have to accept it for practical reasons, unless other people feel strongly

Test coverage

Grabbed the quantization unit tests from the agent

Other details

Pre-requisite for client-side-stats improvements. Part of a stack:

@andrewlock andrewlock requested a review from a team as a code owner April 7, 2026 12:26
@andrewlock andrewlock added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Apr 7, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f00d1b65a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Apr 7, 2026

Benchmarks

Benchmark execution time: 2026-04-08 15:35:08

Comparing candidate commit a44d3e6 in PR branch andrew/client-side-stats/ip-obfuscation with baseline commit d7c107b in branch master.

Found 33 performance improvements and 42 performance regressions! Performance is the same for 205 metrics, 8 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • 🟩 throughput [+9275.748op/s; +11481.796op/s] or [+7.797%; +9.651%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+313.302ms; +315.969ms] or [+155.472%; +156.795%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 execution_time [+380.237ms; +383.116ms] or [+300.410%; +302.685%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+396.974ms; +398.852ms] or [+351.307%; +352.969%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟩 execution_time [-16.020ms; -11.848ms] or [-7.482%; -5.534%]
  • 🟩 throughput [+7850.824op/s; +10639.863op/s] or [+5.731%; +7.766%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0

  • 🟩 execution_time [-26.997ms; -16.715ms] or [-12.040%; -7.454%]
  • 🟩 throughput [+92231.633op/s; +123533.438op/s] or [+9.853%; +13.197%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟩 throughput [+71841.462op/s; +88236.746op/s] or [+10.322%; +12.678%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0

  • 🟩 throughput [+8007.284op/s; +10925.798op/s] or [+5.095%; +6.952%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody netcoreapp3.1

  • 🟩 throughput [+6440.059op/s; +9157.857op/s] or [+5.130%; +7.295%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0

  • 🟩 throughput [+306649.386op/s; +330234.905op/s] or [+10.225%; +11.011%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟩 execution_time [-19.577ms; -15.232ms] or [-9.024%; -7.021%]
  • 🟩 throughput [+136081.462op/s; +189552.745op/s] or [+5.401%; +7.524%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟥 execution_time [+299.960ms; +300.431ms] or [+149.880%; +150.115%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • 🟥 execution_time [+298.758ms; +301.995ms] or [+150.664%; +152.297%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1

  • 🟥 execution_time [+299.469ms; +301.896ms] or [+150.849%; +152.072%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+297.533ms; +298.572ms] or [+146.136%; +146.647%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+293.231ms; +295.435ms] or [+143.350%; +144.427%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+300.170ms; +301.345ms] or [+150.025%; +150.612%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0

  • 🟥 execution_time [+22.634µs; +49.473µs] or [+5.191%; +11.347%]
  • 🟥 throughput [-241.150op/s; -120.425op/s] or [-10.484%; -5.236%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟥 execution_time [+28.208µs; +53.163µs] or [+9.005%; +16.972%]
  • 🟥 throughput [-476.915op/s; -272.272op/s] or [-14.867%; -8.488%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.933ms; +300.631ms] or [+149.697%; +150.045%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • 🟥 execution_time [+413.232ms; +420.052ms] or [+448.994%; +456.404%]
  • 🟩 throughput [+1142.429op/s; +1265.154op/s] or [+9.387%; +10.396%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • 🟩 throughput [+716.803op/s; +916.998op/s] or [+6.939%; +8.877%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+4.599KB; +4.604KB] or [+8.172%; +8.180%]
  • 🟥 throughput [-488.668op/s; -431.118op/s] or [-44.278%; -39.064%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 throughput [-745.667op/s; -662.200op/s] or [-49.736%; -44.169%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+339.725ms; +347.681ms] or [+203.195%; +207.954%]
  • 🟥 throughput [-416.306op/s; -380.814op/s] or [-28.987%; -26.516%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1

  • 🟩 throughput [+19.827op/s; +48.692op/s] or [+5.699%; +13.996%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0

  • 🟩 execution_time [-85.611µs; -64.745µs] or [-7.940%; -6.005%]
  • 🟩 throughput [+60.381op/s; +84.949op/s] or [+6.510%; +9.159%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net6.0

  • 🟩 execution_time [-186.284µs; -145.272µs] or [-9.436%; -7.359%]
  • 🟩 throughput [+42.558op/s; +53.502op/s] or [+8.401%; +10.562%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net472

  • 🟥 throughput [-22356.330op/s; -18642.771op/s] or [-6.297%; -5.251%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+303.010ms; +304.479ms] or [+152.590%; +153.330%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 execution_time [+301.049ms; +302.714ms] or [+150.856%; +151.690%]
  • 🟩 throughput [+44631.198op/s; +49414.079op/s] or [+7.037%; +7.791%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 execution_time [+301.032ms; +304.341ms] or [+151.226%; +152.888%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+301.455ms; +302.984ms] or [+151.381%; +152.148%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 execution_time [+299.775ms; +302.034ms] or [+148.225%; +149.342%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 execution_time [+303.023ms; +306.707ms] or [+153.586%; +155.452%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+301.949ms; +303.438ms] or [+151.551%; +152.298%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 execution_time [+300.489ms; +302.437ms] or [+149.766%; +150.737%]
  • 🟩 throughput [+49985.313op/s; +56722.299op/s] or [+9.925%; +11.263%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 execution_time [+300.752ms; +303.594ms] or [+149.622%; +151.035%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-4755.136op/s; -4517.467op/s] or [-5.428%; -5.157%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟩 execution_time [-16.669ms; -13.004ms] or [-7.751%; -6.047%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟩 allocated_mem [-19.880KB; -19.859KB] or [-7.252%; -7.244%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0

  • 🟥 throughput [-5123.791op/s; -3277.256op/s] or [-21.570%; -13.796%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1

  • 🟩 throughput [+1817.967op/s; +3347.597op/s] or [+11.154%; +20.539%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.502ms; +302.928ms] or [+151.891%; +153.117%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+305.603ms; +309.820ms] or [+155.551%; +157.697%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+300.696ms; +303.224ms] or [+150.536%; +151.801%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 throughput [-19368.280op/s; -18218.950op/s] or [-5.362%; -5.044%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • 🟩 throughput [+45988.357op/s; +50270.608op/s] or [+8.705%; +9.515%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.748ms; +302.355ms] or [+149.896%; +150.697%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+302.268ms; +303.734ms] or [+151.785%; +152.521%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+302.325ms; +304.535ms] or [+153.320%; +154.440%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.820ms; +300.364ms] or [+149.552%; +149.823%]
  • 🟩 throughput [+65264285.029op/s; +65509011.013op/s] or [+47.530%; +47.708%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • 🟩 throughput [+951.589op/s; +1137.299op/s] or [+7.356%; +8.792%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+300.023ms; +300.922ms] or [+149.645%; +150.093%]
  • 🟩 throughput [+18144062.351op/s; +19083715.710op/s] or [+8.037%; +8.453%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0

  • 🟩 throughput [+68419.400op/s; +94169.470op/s] or [+6.388%; +8.792%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1

  • 🟩 throughput [+46341.145op/s; +65599.907op/s] or [+5.364%; +7.593%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0

  • 🟩 throughput [+70903.048op/s; +109150.150op/s] or [+5.488%; +8.448%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟩 throughput [+88748.297op/s; +96054.890op/s] or [+8.814%; +9.540%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472

  • 🟥 throughput [-30174.470op/s; -26441.032op/s] or [-6.723%; -5.891%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0

  • 🟩 throughput [+51821.232op/s; +56045.072op/s] or [+9.410%; +10.177%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟩 throughput [+78980.377op/s; +96942.038op/s] or [+8.824%; +10.831%]

@dd-trace-dotnet-ci-bot
Copy link
Copy Markdown

dd-trace-dotnet-ci-bot bot commented Apr 7, 2026

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8418) and master.

⚠️ Potential regressions detected

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration71.05 ± (71.20 - 71.64) ms78.59 ± (78.56 - 78.99) ms+10.6%❌⬆️
.NET Framework 4.8 - Bailout
duration75.40 ± (75.32 - 75.67) ms82.92 ± (82.80 - 83.24) ms+10.0%❌⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1057.05 ± (1057.61 - 1063.16) ms1141.25 ± (1140.92 - 1146.55) ms+8.0%❌⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration187.77 ± (187.80 - 188.45) ms213.06 ± (212.62 - 213.71) ms+13.5%❌⬆️
.NET Framework 4.8 - Bailout
duration191.59 ± (191.34 - 191.69) ms219.48 ± (219.01 - 220.06) ms+14.6%❌⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1128.41 ± (1135.32 - 1144.68) ms1245.83 ± (1243.46 - 1251.66) ms+10.4%❌⬆️
Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration71.05 ± (71.20 - 71.64) ms78.59 ± (78.56 - 78.99) ms+10.6%❌⬆️
.NET Framework 4.8 - Bailout
duration75.40 ± (75.32 - 75.67) ms82.92 ± (82.80 - 83.24) ms+10.0%❌⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1057.05 ± (1057.61 - 1063.16) ms1141.25 ± (1140.92 - 1146.55) ms+8.0%❌⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.14 ± (22.11 - 22.17) ms23.89 ± (23.83 - 23.96) ms+7.9%✅⬆️
process.time_to_main_ms83.61 ± (83.42 - 83.79) ms92.12 ± (91.89 - 92.35) ms+10.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.89 ± (10.89 - 10.90) MB10.93 ± (10.92 - 10.93) MB+0.3%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.09 ± (22.06 - 22.13) ms23.65 ± (23.59 - 23.71) ms+7.0%✅⬆️
process.time_to_main_ms84.44 ± (84.29 - 84.59) ms93.20 ± (92.96 - 93.43) ms+10.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.93 - 10.94) MB10.95 ± (10.94 - 10.95) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms224.13 ± (222.77 - 225.48) ms239.00 ± (237.79 - 240.21) ms+6.6%✅⬆️
process.time_to_main_ms513.88 ± (512.63 - 515.12) ms558.83 ± (557.42 - 560.24) ms+8.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.87 ± (47.84 - 47.90) MB48.35 ± (48.31 - 48.39) MB+1.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 29)+2.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms20.91 ± (20.89 - 20.94) ms22.53 ± (22.47 - 22.59) ms+7.8%✅⬆️
process.time_to_main_ms72.11 ± (71.96 - 72.26) ms80.27 ± (80.05 - 80.49) ms+11.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.62 - 10.63) MB10.63 ± (10.63 - 10.63) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.85 ± (20.81 - 20.88) ms22.55 ± (22.49 - 22.61) ms+8.2%✅⬆️
process.time_to_main_ms72.82 ± (72.66 - 72.98) ms81.41 ± (81.17 - 81.65) ms+11.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.72 ± (10.71 - 10.72) MB10.74 ± (10.74 - 10.75) MB+0.3%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms386.91 ± (384.51 - 389.31) ms385.62 ± (383.39 - 387.85) ms-0.3%
process.time_to_main_ms514.40 ± (513.59 - 515.21) ms555.39 ± (554.24 - 556.55) ms+8.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.01 ± (49.99 - 50.03) MB49.93 ± (49.90 - 49.96) MB-0.2%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.3%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms18.98 ± (18.95 - 19.01) ms21.03 ± (20.98 - 21.09) ms+10.8%✅⬆️
process.time_to_main_ms70.76 ± (70.60 - 70.92) ms80.09 ± (79.91 - 80.27) ms+13.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.66 - 7.67) MB7.69 ± (7.69 - 7.70) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.15 ± (19.12 - 19.19) ms20.97 ± (20.91 - 21.03) ms+9.5%✅⬆️
process.time_to_main_ms72.21 ± (72.08 - 72.34) ms81.68 ± (81.47 - 81.90) ms+13.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.71 - 7.72) MB7.74 ± (7.74 - 7.75) MB+0.3%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms305.27 ± (302.82 - 307.71) ms312.52 ± (308.85 - 316.19) ms+2.4%✅⬆️
process.time_to_main_ms474.90 ± (474.18 - 475.63) ms519.75 ± (518.73 - 520.78) ms+9.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.95 ± (36.92 - 36.98) MB37.23 ± (37.19 - 37.26) MB+0.7%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.2%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration187.77 ± (187.80 - 188.45) ms213.06 ± (212.62 - 213.71) ms+13.5%❌⬆️
.NET Framework 4.8 - Bailout
duration191.59 ± (191.34 - 191.69) ms219.48 ± (219.01 - 220.06) ms+14.6%❌⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1128.41 ± (1135.32 - 1144.68) ms1245.83 ± (1243.46 - 1251.66) ms+10.4%❌⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms183.67 ± (183.37 - 183.97) ms211.40 ± (210.88 - 211.92) ms+15.1%✅⬆️
process.time_to_main_ms79.10 ± (78.91 - 79.29) ms92.61 ± (92.23 - 92.99) ms+17.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.10 ± (16.01 - 16.20) MB15.84 ± (15.82 - 15.86) MB-1.7%
runtime.dotnet.threads.count19 ± (19 - 19)20 ± (20 - 20)+3.9%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms183.32 ± (183.10 - 183.53) ms210.25 ± (209.74 - 210.76) ms+14.7%✅⬆️
process.time_to_main_ms80.26 ± (80.19 - 80.34) ms93.27 ± (92.99 - 93.55) ms+16.2%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.03 ± (15.92 - 16.14) MB15.91 ± (15.89 - 15.94) MB-0.7%
runtime.dotnet.threads.count20 ± (20 - 20)21 ± (21 - 21)+4.9%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms388.40 ± (387.05 - 389.75) ms424.15 ± (422.79 - 425.50) ms+9.2%✅⬆️
process.time_to_main_ms500.26 ± (499.29 - 501.23) ms560.02 ± (558.37 - 561.67) ms+11.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.17 ± (57.97 - 58.38) MB59.19 ± (59.15 - 59.23) MB+1.7%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+1.6%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms187.68 ± (187.45 - 187.92) ms215.41 ± (214.91 - 215.90) ms+14.8%✅⬆️
process.time_to_main_ms68.93 ± (68.80 - 69.05) ms79.76 ± (79.47 - 80.05) ms+15.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.07 ± (15.91 - 16.23) MB16.18 ± (16.15 - 16.20) MB+0.6%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)20 ± (19 - 20)+8.2%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms186.90 ± (186.73 - 187.07) ms214.57 ± (214.04 - 215.10) ms+14.8%✅⬆️
process.time_to_main_ms69.56 ± (69.50 - 69.62) ms80.98 ± (80.72 - 81.24) ms+16.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed15.40 ± (15.24 - 15.57) MB16.25 ± (16.22 - 16.27) MB+5.5%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)21 ± (20 - 21)+12.4%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms597.05 ± (594.20 - 599.91) ms601.22 ± (598.71 - 603.74) ms+0.7%✅⬆️
process.time_to_main_ms501.78 ± (500.91 - 502.65) ms559.15 ± (557.93 - 560.36) ms+11.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.64 ± (61.54 - 61.73) MB61.47 ± (61.36 - 61.57) MB-0.3%
runtime.dotnet.threads.count30 ± (30 - 30)31 ± (31 - 31)+1.8%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms185.50 ± (185.26 - 185.74) ms212.67 ± (212.13 - 213.21) ms+14.6%✅⬆️
process.time_to_main_ms68.29 ± (68.13 - 68.45) ms78.98 ± (78.69 - 79.26) ms+15.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.70 ± (11.59 - 11.80) MB11.56 ± (11.54 - 11.59) MB-1.1%
runtime.dotnet.threads.count18 ± (17 - 18)19 ± (19 - 19)+7.9%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms184.40 ± (184.25 - 184.56) ms213.33 ± (212.78 - 213.88) ms+15.7%✅⬆️
process.time_to_main_ms69.12 ± (69.08 - 69.16) ms80.19 ± (79.91 - 80.47) ms+16.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.27 ± (11.14 - 11.40) MB11.67 ± (11.65 - 11.68) MB+3.5%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)20 ± (20 - 20)+11.5%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms522.62 ± (519.98 - 525.26) ms576.90 ± (568.85 - 584.96) ms+10.4%✅⬆️
process.time_to_main_ms460.71 ± (460.07 - 461.34) ms518.15 ± (517.02 - 519.28) ms+12.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.82 ± (50.79 - 50.84) MB51.31 ± (51.21 - 51.41) MB+1.0%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+1.0%✅⬆️
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8418) - mean (79ms)  : 76, 82
    master - mean (71ms)  : 68, 75

    section Bailout
    This PR (8418) - mean (83ms)  : crit, 80, 86
    master - mean (75ms)  : 73, 78

    section CallTarget+Inlining+NGEN
    This PR (8418) - mean (1,144ms)  : crit, 1104, 1184
    master - mean (1,060ms)  : 1020, 1101

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8418) - mean (123ms)  : 119, 127
    master - mean (112ms)  : 108, 116

    section Bailout
    This PR (8418) - mean (124ms)  : crit, 119, 130
    master - mean (113ms)  : 111, 116

    section CallTarget+Inlining+NGEN
    This PR (8418) - mean (835ms)  : crit, 813, 857
    master - mean (775ms)  : 756, 794

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8418) - mean (110ms)  : 106, 114
    master - mean (99ms)  : 96, 102

    section Bailout
    This PR (8418) - mean (111ms)  : crit, 108, 114
    master - mean (99ms)  : 97, 102

    section CallTarget+Inlining+NGEN
    This PR (8418) - mean (971ms)  : 930, 1013
    master - mean (929ms)  : 896, 962

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8418) - mean (110ms)  : 106, 113
    master - mean (97ms)  : 94, 101

    section Bailout
    This PR (8418) - mean (111ms)  : crit, 108, 114
    master - mean (99ms)  : 97, 101

    section CallTarget+Inlining+NGEN
    This PR (8418) - mean (861ms)  : crit, 811, 912
    master - mean (811ms)  : 770, 851

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8418) - mean (213ms)  : 207, 219
    master - mean (188ms)  : 185, 191

    section Bailout
    This PR (8418) - mean (220ms)  : crit, 214, 225
    master - mean (192ms)  : 190, 193

    section CallTarget+Inlining+NGEN
    This PR (8418) - mean (1,248ms)  : crit, 1185, 1310
    master - mean (1,140ms)  : 1067, 1213

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8418) - mean (314ms)  : 306, 322
    master - mean (271ms)  : 266, 275

    section Bailout
    This PR (8418) - mean (313ms)  : crit, 304, 322
    master - mean (271ms)  : 268, 274

    section CallTarget+Inlining+NGEN
    This PR (8418) - mean (1,023ms)  : crit, 988, 1059
    master - mean (918ms)  : 897, 940

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8418) - mean (305ms)  : 296, 314
    master - mean (265ms)  : 261, 268

    section Bailout
    This PR (8418) - mean (304ms)  : crit, 298, 311
    master - mean (264ms)  : 262, 266

    section CallTarget+Inlining+NGEN
    This PR (8418) - mean (1,192ms)  : crit, 1149, 1236
    master - mean (1,128ms)  : 1083, 1173

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8418) - mean (302ms)  : 295, 309
    master - mean (263ms)  : 260, 267

    section Bailout
    This PR (8418) - mean (305ms)  : crit, 298, 312
    master - mean (263ms)  : 261, 264

    section CallTarget+Inlining+NGEN
    This PR (8418) - mean (1,131ms)  : crit, 1009, 1253
    master - mean (1,015ms)  : 974, 1055

Loading

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an IP address quantization utility to obfuscate peer-tag IPs (reducing stats cardinality) and ports the corresponding unit tests from the Go agent.

Changes:

  • Introduces IpAddressObfuscationUtil to detect/obfuscate IPs (with scheme/prefix handling) and deduplicate entries.
  • Adds unit tests covering a variety of IPv4/IPv6/hostname formats and comma-separated peer lists.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
tracer/src/Datadog.Trace/Processors/IpAddressObfuscationUtil.cs Implements IP detection + obfuscation + deduplication logic for peer tags
tracer/test/Datadog.Trace.Tests/TraceProcessors/IpAddressObfuscationUtilTests.cs Adds ported test cases validating expected quantization behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@andrewlock andrewlock force-pushed the andrew/client-side-stats/ip-obfuscation branch from f00d1b6 to 77f3510 Compare April 8, 2026 10:41
@andrewlock andrewlock requested review from a team as code owners April 8, 2026 10:41
@andrewlock andrewlock force-pushed the andrew/client-side-stats/char-helpers branch from 8c15dbe to 46be799 Compare April 8, 2026 10:41
@andrewlock andrewlock force-pushed the andrew/client-side-stats/ip-obfuscation branch from 77f3510 to 536d246 Compare April 8, 2026 10:57
Base automatically changed from andrew/client-side-stats/char-helpers to master April 8, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants