Add IpAddressObfuscationUtil for use with client-side-stats#8418
Add IpAddressObfuscationUtil for use with client-side-stats#8418andrewlock wants to merge 7 commits intomasterfrom
IpAddressObfuscationUtil for use with client-side-stats#8418Conversation
There was a problem hiding this comment.
💡 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".
tracer/src/Datadog.Trace/Processors/IpAddressObfuscationUtil.cs
Outdated
Show resolved
Hide resolved
BenchmarksBenchmark execution time: 2026-04-08 15:35:08 Comparing candidate commit a44d3e6 in PR branch Found 33 performance improvements and 42 performance regressions! Performance is the same for 205 metrics, 8 unstable metrics.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8418) and master.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Metric | Master (Mean ± 95% CI) | Current (Mean ± 95% CI) | Change | Status |
|---|---|---|---|---|
| .NET Framework 4.8 - Baseline | ||||
| duration | 71.05 ± (71.20 - 71.64) ms | 78.59 ± (78.56 - 78.99) ms | +10.6% | ❌⬆️ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 75.40 ± (75.32 - 75.67) ms | 82.92 ± (82.80 - 83.24) ms | +10.0% | ❌⬆️ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1057.05 ± (1057.61 - 1063.16) ms | 1141.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 | ||||
| duration | 187.77 ± (187.80 - 188.45) ms | 213.06 ± (212.62 - 213.71) ms | +13.5% | ❌⬆️ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 191.59 ± (191.34 - 191.69) ms | 219.48 ± (219.01 - 220.06) ms | +14.6% | ❌⬆️ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1128.41 ± (1135.32 - 1144.68) ms | 1245.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 | ||||
| duration | 71.05 ± (71.20 - 71.64) ms | 78.59 ± (78.56 - 78.99) ms | +10.6% | ❌⬆️ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 75.40 ± (75.32 - 75.67) ms | 82.92 ± (82.80 - 83.24) ms | +10.0% | ❌⬆️ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1057.05 ± (1057.61 - 1063.16) ms | 1141.25 ± (1140.92 - 1146.55) ms | +8.0% | ❌⬆️ |
| .NET Core 3.1 - Baseline | ||||
| process.internal_duration_ms | 22.14 ± (22.11 - 22.17) ms | 23.89 ± (23.83 - 23.96) ms | +7.9% | ✅⬆️ |
| process.time_to_main_ms | 83.61 ± (83.42 - 83.79) ms | 92.12 ± (91.89 - 92.35) ms | +10.2% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.89 ± (10.89 - 10.90) MB | 10.93 ± (10.92 - 10.93) MB | +0.3% | ✅⬆️ |
| runtime.dotnet.threads.count | 12 ± (12 - 12) | 12 ± (12 - 12) | +0.0% | ✅ |
| .NET Core 3.1 - Bailout | ||||
| process.internal_duration_ms | 22.09 ± (22.06 - 22.13) ms | 23.65 ± (23.59 - 23.71) ms | +7.0% | ✅⬆️ |
| process.time_to_main_ms | 84.44 ± (84.29 - 84.59) ms | 93.20 ± (92.96 - 93.43) ms | +10.4% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.93 ± (10.93 - 10.94) MB | 10.95 ± (10.94 - 10.95) MB | +0.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 13 ± (13 - 13) | 13 ± (13 - 13) | +0.0% | ✅ |
| .NET Core 3.1 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 224.13 ± (222.77 - 225.48) ms | 239.00 ± (237.79 - 240.21) ms | +6.6% | ✅⬆️ |
| process.time_to_main_ms | 513.88 ± (512.63 - 515.12) ms | 558.83 ± (557.42 - 560.24) ms | +8.7% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 47.87 ± (47.84 - 47.90) MB | 48.35 ± (48.31 - 48.39) MB | +1.0% | ✅⬆️ |
| runtime.dotnet.threads.count | 28 ± (28 - 28) | 28 ± (28 - 29) | +2.0% | ✅⬆️ |
| .NET 6 - Baseline | ||||
| process.internal_duration_ms | 20.91 ± (20.89 - 20.94) ms | 22.53 ± (22.47 - 22.59) ms | +7.8% | ✅⬆️ |
| process.time_to_main_ms | 72.11 ± (71.96 - 72.26) ms | 80.27 ± (80.05 - 80.49) ms | +11.3% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.62 ± (10.62 - 10.63) MB | 10.63 ± (10.63 - 10.63) MB | +0.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 10 ± (10 - 10) | 10 ± (10 - 10) | +0.0% | ✅ |
| .NET 6 - Bailout | ||||
| process.internal_duration_ms | 20.85 ± (20.81 - 20.88) ms | 22.55 ± (22.49 - 22.61) ms | +8.2% | ✅⬆️ |
| process.time_to_main_ms | 72.82 ± (72.66 - 72.98) ms | 81.41 ± (81.17 - 81.65) ms | +11.8% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.72 ± (10.71 - 10.72) MB | 10.74 ± (10.74 - 10.75) MB | +0.3% | ✅⬆️ |
| runtime.dotnet.threads.count | 11 ± (11 - 11) | 11 ± (11 - 11) | +0.0% | ✅ |
| .NET 6 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 386.91 ± (384.51 - 389.31) ms | 385.62 ± (383.39 - 387.85) ms | -0.3% | ✅ |
| process.time_to_main_ms | 514.40 ± (513.59 - 515.21) ms | 555.39 ± (554.24 - 556.55) ms | +8.0% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 50.01 ± (49.99 - 50.03) MB | 49.93 ± (49.90 - 49.96) MB | -0.2% | ✅ |
| runtime.dotnet.threads.count | 28 ± (28 - 28) | 28 ± (28 - 28) | +0.3% | ✅⬆️ |
| .NET 8 - Baseline | ||||
| process.internal_duration_ms | 18.98 ± (18.95 - 19.01) ms | 21.03 ± (20.98 - 21.09) ms | +10.8% | ✅⬆️ |
| process.time_to_main_ms | 70.76 ± (70.60 - 70.92) ms | 80.09 ± (79.91 - 80.27) ms | +13.2% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 7.66 ± (7.66 - 7.67) MB | 7.69 ± (7.69 - 7.70) MB | +0.4% | ✅⬆️ |
| runtime.dotnet.threads.count | 10 ± (10 - 10) | 10 ± (10 - 10) | +0.0% | ✅ |
| .NET 8 - Bailout | ||||
| process.internal_duration_ms | 19.15 ± (19.12 - 19.19) ms | 20.97 ± (20.91 - 21.03) ms | +9.5% | ✅⬆️ |
| process.time_to_main_ms | 72.21 ± (72.08 - 72.34) ms | 81.68 ± (81.47 - 81.90) ms | +13.1% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 7.72 ± (7.71 - 7.72) MB | 7.74 ± (7.74 - 7.75) MB | +0.3% | ✅⬆️ |
| runtime.dotnet.threads.count | 11 ± (11 - 11) | 11 ± (11 - 11) | +0.0% | ✅ |
| .NET 8 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 305.27 ± (302.82 - 307.71) ms | 312.52 ± (308.85 - 316.19) ms | +2.4% | ✅⬆️ |
| process.time_to_main_ms | 474.90 ± (474.18 - 475.63) ms | 519.75 ± (518.73 - 520.78) ms | +9.4% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 36.95 ± (36.92 - 36.98) MB | 37.23 ± (37.19 - 37.26) MB | +0.7% | ✅⬆️ |
| runtime.dotnet.threads.count | 27 ± (27 - 27) | 27 ± (27 - 27) | -0.2% | ✅ |
HttpMessageHandler
| Metric | Master (Mean ± 95% CI) | Current (Mean ± 95% CI) | Change | Status |
|---|---|---|---|---|
| .NET Framework 4.8 - Baseline | ||||
| duration | 187.77 ± (187.80 - 188.45) ms | 213.06 ± (212.62 - 213.71) ms | +13.5% | ❌⬆️ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 191.59 ± (191.34 - 191.69) ms | 219.48 ± (219.01 - 220.06) ms | +14.6% | ❌⬆️ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1128.41 ± (1135.32 - 1144.68) ms | 1245.83 ± (1243.46 - 1251.66) ms | +10.4% | ❌⬆️ |
| .NET Core 3.1 - Baseline | ||||
| process.internal_duration_ms | 183.67 ± (183.37 - 183.97) ms | 211.40 ± (210.88 - 211.92) ms | +15.1% | ✅⬆️ |
| process.time_to_main_ms | 79.10 ± (78.91 - 79.29) ms | 92.61 ± (92.23 - 92.99) ms | +17.1% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.10 ± (16.01 - 16.20) MB | 15.84 ± (15.82 - 15.86) MB | -1.7% | ✅ |
| runtime.dotnet.threads.count | 19 ± (19 - 19) | 20 ± (20 - 20) | +3.9% | ✅⬆️ |
| .NET Core 3.1 - Bailout | ||||
| process.internal_duration_ms | 183.32 ± (183.10 - 183.53) ms | 210.25 ± (209.74 - 210.76) ms | +14.7% | ✅⬆️ |
| process.time_to_main_ms | 80.26 ± (80.19 - 80.34) ms | 93.27 ± (92.99 - 93.55) ms | +16.2% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.03 ± (15.92 - 16.14) MB | 15.91 ± (15.89 - 15.94) MB | -0.7% | ✅ |
| runtime.dotnet.threads.count | 20 ± (20 - 20) | 21 ± (21 - 21) | +4.9% | ✅⬆️ |
| .NET Core 3.1 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 388.40 ± (387.05 - 389.75) ms | 424.15 ± (422.79 - 425.50) ms | +9.2% | ✅⬆️ |
| process.time_to_main_ms | 500.26 ± (499.29 - 501.23) ms | 560.02 ± (558.37 - 561.67) ms | +11.9% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 58.17 ± (57.97 - 58.38) MB | 59.19 ± (59.15 - 59.23) MB | +1.7% | ✅⬆️ |
| runtime.dotnet.threads.count | 30 ± (30 - 30) | 30 ± (30 - 30) | +1.6% | ✅⬆️ |
| .NET 6 - Baseline | ||||
| process.internal_duration_ms | 187.68 ± (187.45 - 187.92) ms | 215.41 ± (214.91 - 215.90) ms | +14.8% | ✅⬆️ |
| process.time_to_main_ms | 68.93 ± (68.80 - 69.05) ms | 79.76 ± (79.47 - 80.05) ms | +15.7% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.07 ± (15.91 - 16.23) MB | 16.18 ± (16.15 - 16.20) MB | +0.6% | ✅⬆️ |
| runtime.dotnet.threads.count | 18 ± (18 - 18) | 20 ± (19 - 20) | +8.2% | ✅⬆️ |
| .NET 6 - Bailout | ||||
| process.internal_duration_ms | 186.90 ± (186.73 - 187.07) ms | 214.57 ± (214.04 - 215.10) ms | +14.8% | ✅⬆️ |
| process.time_to_main_ms | 69.56 ± (69.50 - 69.62) ms | 80.98 ± (80.72 - 81.24) ms | +16.4% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 15.40 ± (15.24 - 15.57) MB | 16.25 ± (16.22 - 16.27) MB | +5.5% | ✅⬆️ |
| runtime.dotnet.threads.count | 18 ± (18 - 18) | 21 ± (20 - 21) | +12.4% | ✅⬆️ |
| .NET 6 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 597.05 ± (594.20 - 599.91) ms | 601.22 ± (598.71 - 603.74) ms | +0.7% | ✅⬆️ |
| process.time_to_main_ms | 501.78 ± (500.91 - 502.65) ms | 559.15 ± (557.93 - 560.36) ms | +11.4% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 61.64 ± (61.54 - 61.73) MB | 61.47 ± (61.36 - 61.57) MB | -0.3% | ✅ |
| runtime.dotnet.threads.count | 30 ± (30 - 30) | 31 ± (31 - 31) | +1.8% | ✅⬆️ |
| .NET 8 - Baseline | ||||
| process.internal_duration_ms | 185.50 ± (185.26 - 185.74) ms | 212.67 ± (212.13 - 213.21) ms | +14.6% | ✅⬆️ |
| process.time_to_main_ms | 68.29 ± (68.13 - 68.45) ms | 78.98 ± (78.69 - 79.26) ms | +15.6% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 11.70 ± (11.59 - 11.80) MB | 11.56 ± (11.54 - 11.59) MB | -1.1% | ✅ |
| runtime.dotnet.threads.count | 18 ± (17 - 18) | 19 ± (19 - 19) | +7.9% | ✅⬆️ |
| .NET 8 - Bailout | ||||
| process.internal_duration_ms | 184.40 ± (184.25 - 184.56) ms | 213.33 ± (212.78 - 213.88) ms | +15.7% | ✅⬆️ |
| process.time_to_main_ms | 69.12 ± (69.08 - 69.16) ms | 80.19 ± (79.91 - 80.47) ms | +16.0% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 11.27 ± (11.14 - 11.40) MB | 11.67 ± (11.65 - 11.68) MB | +3.5% | ✅⬆️ |
| runtime.dotnet.threads.count | 18 ± (18 - 18) | 20 ± (20 - 20) | +11.5% | ✅⬆️ |
| .NET 8 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 522.62 ± (519.98 - 525.26) ms | 576.90 ± (568.85 - 584.96) ms | +10.4% | ✅⬆️ |
| process.time_to_main_ms | 460.71 ± (460.07 - 461.34) ms | 518.15 ± (517.02 - 519.28) ms | +12.5% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 50.82 ± (50.79 - 50.84) MB | 51.31 ± (51.21 - 51.41) MB | +1.0% | ✅⬆️ |
| runtime.dotnet.threads.count | 30 ± (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
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
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
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
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
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
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
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
There was a problem hiding this comment.
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
IpAddressObfuscationUtilto 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.
tracer/src/Datadog.Trace/Processors/IpAddressObfuscationUtil.cs
Outdated
Show resolved
Hide resolved
tracer/src/Datadog.Trace/Processors/IpAddressObfuscationUtil.cs
Outdated
Show resolved
Hide resolved
tracer/src/Datadog.Trace/Processors/IpAddressObfuscationUtil.cs
Outdated
Show resolved
Hide resolved
tracer/test/Datadog.Trace.Tests/TraceProcessors/IpAddressObfuscationUtilTests.cs
Show resolved
Hide resolved
f00d1b6 to
77f3510
Compare
8c15dbe to
46be799
Compare
77f3510 to
536d246
Compare
536d246 to
a44d3e6
Compare
Summary of changes
Adds the
IpAddressObfuscationUtilhelper for use by client-side statsReason 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.
Test coverage
Grabbed the quantization unit tests from the agent
Other details
Pre-requisite for client-side-stats improvements. Part of a stack:
charhelpers likeIsAsciiHexDigit#8417