Skip to content

[Process Tags] Explicit whether the service name is the default one#8106

Merged
vandonr merged 17 commits into
masterfrom
pierre/tags
Mar 19, 2026
Merged

[Process Tags] Explicit whether the service name is the default one#8106
vandonr merged 17 commits into
masterfrom
pierre/tags

Conversation

@pierotibou

@pierotibou pierotibou commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Implements Andrea's specification.
TLDR: We need to send in process tags whether the service used is the one set by the user or the default one.
It was deemed acceptable not to handle the case where the service is set at the scope level when creating spans, so we focus on service set by the user through config.

Reason for change

Service renaming shouldn't rename a service if it's the one set by the customer but the backend doesn't know that today

Implementation details

  • As the service can be changed in the settings, I moved the process tags in the MutableSettings. As a side effect it simplifies part of the code as we don't have to pass service tags anymore as they're in Settings.
  • The ProcessTags object is null when the PropagateServiceTag config key is false. We rely in the rest of the code on whether the tags are null or not.
  • Process tags are still lazily initialized. The ProcessTags class is merely a container of the information needed when you need to serialize them.

Test coverage

Utests mainly.
There are system tests to update once merged: DataDog/system-tests#6204

Other details

AI generated and polished by hand (and repolished again :p)

APMLP-1000

@pierotibou pierotibou changed the title [Process Tags] Explicit whether the service name is [Process Tags] WIP - Explicit whether the service name is Jan 27, 2026
@pierotibou pierotibou force-pushed the pierre/tags branch 4 times, most recently from c5db5a3 to b7c1f86 Compare January 27, 2026 09:51
@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Jan 27, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

⚠️ Potential regressions detected

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration68.88 ± (68.85 - 69.12) ms75.92 ± (75.90 - 76.21) ms+10.2%❌⬆️
.NET Framework 4.8 - Bailout
duration72.74 ± (72.65 - 72.87) ms80.29 ± (80.20 - 80.58) ms+10.4%❌⬆️
Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration68.88 ± (68.85 - 69.12) ms75.92 ± (75.90 - 76.21) ms+10.2%❌⬆️
.NET Framework 4.8 - Bailout
duration72.74 ± (72.65 - 72.87) ms80.29 ± (80.20 - 80.58) ms+10.4%❌⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1044.68 ± (1046.91 - 1054.55) ms1102.62 ± (1103.55 - 1111.30) ms+5.5%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms21.94 ± (21.91 - 21.98) ms23.14 ± (23.09 - 23.20) ms+5.5%✅⬆️
process.time_to_main_ms79.95 ± (79.78 - 80.13) ms88.56 ± (88.36 - 88.76) ms+10.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.89 ± (10.89 - 10.90) MB10.91 ± (10.90 - 10.91) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms21.87 ± (21.85 - 21.90) ms23.24 ± (23.18 - 23.30) ms+6.2%✅⬆️
process.time_to_main_ms81.13 ± (80.96 - 81.30) ms91.14 ± (90.90 - 91.37) ms+12.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.94 ± (10.93 - 10.94) MB10.94 ± (10.93 - 10.94) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms217.31 ± (216.32 - 218.31) ms226.37 ± (224.86 - 227.88) ms+4.2%✅⬆️
process.time_to_main_ms472.53 ± (471.95 - 473.12) ms506.92 ± (505.84 - 508.00) ms+7.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.22 ± (47.19 - 47.25) MB47.17 ± (47.14 - 47.20) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-1.4%
.NET 6 - Baseline
process.internal_duration_ms20.78 ± (20.75 - 20.80) ms22.13 ± (22.09 - 22.18) ms+6.5%✅⬆️
process.time_to_main_ms69.34 ± (69.21 - 69.47) ms78.19 ± (77.99 - 78.40) ms+12.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.61 ± (10.61 - 10.62) MB10.64 ± (10.63 - 10.64) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.70 ± (20.67 - 20.72) ms21.93 ± (21.87 - 21.98) ms+6.0%✅⬆️
process.time_to_main_ms70.13 ± (70.01 - 70.26) ms78.92 ± (78.72 - 79.12) ms+12.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.72 ± (10.71 - 10.72) MB10.74 ± (10.73 - 10.74) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms205.49 ± (203.60 - 207.38) ms212.24 ± (210.43 - 214.05) ms+3.3%✅⬆️
process.time_to_main_ms474.73 ± (473.78 - 475.67) ms503.72 ± (502.99 - 504.45) ms+6.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.97 ± (48.91 - 49.03) MB49.23 ± (49.20 - 49.26) MB+0.5%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms18.92 ± (18.90 - 18.95) ms20.06 ± (20.03 - 20.10) ms+6.0%✅⬆️
process.time_to_main_ms68.66 ± (68.53 - 68.78) ms75.93 ± (75.75 - 76.11) ms+10.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.67 - 7.68) MB7.69 ± (7.68 - 7.69) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms18.98 ± (18.94 - 19.01) ms19.90 ± (19.85 - 19.95) ms+4.9%✅⬆️
process.time_to_main_ms69.96 ± (69.84 - 70.07) ms76.82 ± (76.66 - 76.98) ms+9.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.73) MB7.72 ± (7.71 - 7.73) MB-0.1%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms157.34 ± (156.36 - 158.33) ms168.88 ± (167.83 - 169.92) ms+7.3%✅⬆️
process.time_to_main_ms450.08 ± (449.43 - 450.73) ms485.97 ± (485.13 - 486.81) ms+8.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.49 ± (36.47 - 36.50) MB36.51 ± (36.49 - 36.53) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.6%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration193.10 ± (193.27 - 194.18) ms194.99 ± (195.21 - 196.02) ms+1.0%✅⬆️
.NET Framework 4.8 - Bailout
duration196.74 ± (196.62 - 197.21) ms198.07 ± (197.69 - 198.54) ms+0.7%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1152.56 ± (1153.77 - 1161.61) ms1162.12 ± (1163.31 - 1171.31) ms+0.8%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms189.37 ± (188.95 - 189.80) ms189.91 ± (189.49 - 190.33) ms+0.3%✅⬆️
process.time_to_main_ms81.34 ± (81.17 - 81.51) ms81.88 ± (81.65 - 82.12) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.14 ± (16.12 - 16.16) MB16.13 ± (16.11 - 16.15) MB-0.1%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.4%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms187.42 ± (187.09 - 187.76) ms190.26 ± (189.81 - 190.71) ms+1.5%✅⬆️
process.time_to_main_ms82.04 ± (81.94 - 82.14) ms83.56 ± (83.32 - 83.80) ms+1.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.13 - 16.19) MB16.14 ± (16.11 - 16.17) MB-0.1%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms398.17 ± (396.19 - 400.15) ms396.47 ± (394.80 - 398.14) ms-0.4%
process.time_to_main_ms472.98 ± (472.30 - 473.65) ms476.83 ± (476.16 - 477.50) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.78 ± (57.63 - 57.94) MB57.87 ± (57.71 - 58.03) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.0%
.NET 6 - Baseline
process.internal_duration_ms193.01 ± (192.57 - 193.46) ms193.64 ± (193.33 - 193.95) ms+0.3%✅⬆️
process.time_to_main_ms70.12 ± (69.93 - 70.32) ms70.67 ± (70.51 - 70.84) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.00 ± (15.86 - 16.14) MB16.45 ± (16.42 - 16.48) MB+2.8%✅⬆️
runtime.dotnet.threads.count19 ± (18 - 19)19 ± (19 - 19)+2.0%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms191.65 ± (191.31 - 191.99) ms193.69 ± (193.29 - 194.09) ms+1.1%✅⬆️
process.time_to_main_ms71.10 ± (70.99 - 71.20) ms71.64 ± (71.51 - 71.77) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.07 ± (15.92 - 16.22) MB16.34 ± (16.24 - 16.43) MB+1.7%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)20 ± (20 - 20)+3.6%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms429.10 ± (427.14 - 431.05) ms431.53 ± (429.88 - 433.17) ms+0.6%✅⬆️
process.time_to_main_ms477.14 ± (476.30 - 477.98) ms480.30 ± (479.58 - 481.03) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed60.22 ± (60.15 - 60.29) MB60.22 ± (60.16 - 60.28) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
.NET 8 - Baseline
process.internal_duration_ms190.10 ± (189.64 - 190.56) ms190.60 ± (190.19 - 191.00) ms+0.3%✅⬆️
process.time_to_main_ms69.82 ± (69.66 - 69.97) ms70.34 ± (70.15 - 70.54) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.84 ± (11.81 - 11.87) MB11.76 ± (11.74 - 11.79) MB-0.7%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.1%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms189.61 ± (189.26 - 189.95) ms190.07 ± (189.78 - 190.36) ms+0.2%✅⬆️
process.time_to_main_ms70.93 ± (70.77 - 71.09) ms71.22 ± (71.10 - 71.34) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.84 ± (11.81 - 11.87) MB11.86 ± (11.83 - 11.89) MB+0.2%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.4%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms355.55 ± (354.22 - 356.87) ms352.52 ± (351.24 - 353.79) ms-0.9%
process.time_to_main_ms453.51 ± (452.85 - 454.17) ms456.41 ± (455.69 - 457.13) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed48.38 ± (48.33 - 48.42) MB48.37 ± (48.34 - 48.40) MB-0.0%
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.1%
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 (8106) - mean (76ms)  : 74, 78
    master - mean (69ms)  : 67, 71

    section Bailout
    This PR (8106) - mean (80ms)  : crit, 78, 83
    master - mean (73ms)  : 72, 74

    section CallTarget+Inlining+NGEN
    This PR (8106) - mean (1,107ms)  : 1048, 1167
    master - mean (1,051ms)  : 996, 1105

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 (8106) - mean (119ms)  : 116, 122
    master - mean (108ms)  : 105, 111

    section Bailout
    This PR (8106) - mean (122ms)  : crit, 119, 124
    master - mean (109ms)  : 106, 111

    section CallTarget+Inlining+NGEN
    This PR (8106) - mean (769ms)  : crit, 748, 790
    master - mean (727ms)  : 707, 747

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8106) - mean (107ms)  : 103, 111
    master - mean (95ms)  : 93, 98

    section Bailout
    This PR (8106) - mean (108ms)  : crit, 105, 110
    master - mean (96ms)  : 94, 98

    section CallTarget+Inlining+NGEN
    This PR (8106) - mean (752ms)  : crit, 713, 791
    master - mean (709ms)  : 659, 758

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8106) - mean (104ms)  : 100, 108
    master - mean (94ms)  : 91, 97

    section Bailout
    This PR (8106) - mean (105ms)  : crit, 102, 107
    master - mean (96ms)  : 94, 98

    section CallTarget+Inlining+NGEN
    This PR (8106) - mean (694ms)  : crit, 657, 730
    master - mean (642ms)  : 608, 676

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 (8106) - mean (196ms)  : 191, 200
    master - mean (194ms)  : 188, 199

    section Bailout
    This PR (8106) - mean (198ms)  : 194, 202
    master - mean (197ms)  : 194, 200

    section CallTarget+Inlining+NGEN
    This PR (8106) - mean (1,167ms)  : 1111, 1224
    master - mean (1,158ms)  : 1102, 1214

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 (8106) - mean (281ms)  : 274, 287
    master - mean (279ms)  : 270, 289

    section Bailout
    This PR (8106) - mean (282ms)  : 276, 289
    master - mean (278ms)  : 274, 281

    section CallTarget+Inlining+NGEN
    This PR (8106) - mean (907ms)  : 873, 941
    master - mean (904ms)  : 875, 933

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8106) - mean (273ms)  : 268, 277
    master - mean (271ms)  : 266, 277

    section Bailout
    This PR (8106) - mean (273ms)  : 268, 278
    master - mean (271ms)  : 266, 276

    section CallTarget+Inlining+NGEN
    This PR (8106) - mean (944ms)  : 914, 974
    master - mean (939ms)  : 904, 973

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8106) - mean (271ms)  : 265, 277
    master - mean (270ms)  : 265, 275

    section Bailout
    This PR (8106) - mean (271ms)  : 267, 275
    master - mean (270ms)  : 264, 275

    section CallTarget+Inlining+NGEN
    This PR (8106) - mean (841ms)  : 816, 866
    master - mean (839ms)  : 812, 865

Loading

@pr-commenter

pr-commenter Bot commented Jan 27, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-03-19 17:10:11

Comparing candidate commit 9d9dd50 in PR branch pierre/tags with baseline commit 79e68df in branch master.

Found 6 performance improvements and 5 performance regressions! Performance is the same for 171 metrics, 10 unstable metrics.

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

  • 🟩 execution_time [-16.804ms; -11.570ms] or [-7.848%; -5.403%]

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

  • 🟩 execution_time [-18.376ms; -14.525ms] or [-8.625%; -6.817%]

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

  • 🟥 execution_time [+20.379ms; +25.410ms] or [+10.197%; +12.714%]

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

  • 🟥 execution_time [+15.677ms; +21.925ms] or [+7.941%; +11.106%]

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

  • 🟥 execution_time [+18.100ms; +22.274ms] or [+9.155%; +11.266%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1

  • 🟩 execution_time [-51.102µs; -20.823µs] or [-13.991%; -5.701%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 throughput [-104.027op/s; -78.389op/s] or [-8.843%; -6.664%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 throughput [-20120.807op/s; -18069.207op/s] or [-6.089%; -5.468%]

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

  • 🟩 execution_time [-56.871ms; -52.615ms] or [-28.639%; -26.495%]

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

  • 🟩 execution_time [-32.329ms; -29.105ms] or [-16.019%; -14.422%]

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

  • 🟩 throughput [+15560232.438op/s; +16707446.169op/s] or [+6.906%; +7.415%]

@pierotibou

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: b7c1f864b4

ℹ️ 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".

Comment thread tracer/src/Datadog.Trace/Agent/MessagePack/SpanMessagePackFormatter.cs Outdated
@pierotibou pierotibou changed the title [Process Tags] WIP - Explicit whether the service name is [Process Tags] WIP - Explicit whether the service name is the default one Jan 31, 2026
@pierotibou pierotibou changed the title [Process Tags] WIP - Explicit whether the service name is the default one [Process Tags] Explicit whether the service name is the default one Jan 31, 2026
@pierotibou pierotibou marked this pull request as ready for review February 2, 2026 09:00
@pierotibou pierotibou requested review from a team as code owners February 2, 2026 09:00

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

Copy link
Copy Markdown

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: 31b0bddb3c

ℹ️ 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".

Comment thread tracer/src/Datadog.Trace/Configuration/MutableSettings.cs
Comment thread tracer/src/Datadog.Trace/ProcessTags.cs Outdated
@pierotibou pierotibou added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Feb 4, 2026
Comment thread tracer/src/Datadog.Trace/Agent/MessagePack/MessagePackStringCache.cs Outdated
Comment thread tracer/src/Datadog.Trace/ProcessTags.cs
Comment thread tracer/src/Datadog.Trace/Agent/ClientStatsPayload.cs Outdated
Comment thread tracer/src/Datadog.Trace/ProcessTags.cs Outdated
pierotibou and others added 10 commits March 16, 2026 17:09
ProcessTags are now computed lazily.
They are also called in the relevant way from the settings.

Signed-off-by: Pierre Bonet <pierre.bonet@datadoghq.com>
Signed-off-by: Pierre Bonet <pierre.bonet@datadoghq.com>
Signed-off-by: Pierre Bonet <pierre.bonet@datadoghq.com>
Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
It is indeed not needed as we never send it when the service name is set.
Also adds nullable enable

@NachoEchevarria NachoEchevarria left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

Comment thread tracer/src/Datadog.Trace/Configuration/MutableSettings.cs
Comment thread tracer/src/Datadog.Trace/Agent/StatsBuffer.cs Outdated
Comment thread tracer/src/Datadog.Trace/Telemetry/Collectors/ApplicationTelemetryCollector.cs Outdated

@lucaspimentel lucaspimentel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Left a few small comments, but LGTM aside from that. Thanks!

vandonr added a commit that referenced this pull request Mar 17, 2026
## Summary of changes

Populate process tags and container ID in the tracer metadata stored via
libdatadog for service discovery.

The struct being filled is defined here:

https://github.com/DataDog/libdatadog/blob/bc8f7642ece80d32f171efb51e6e4ddbbd2f6399/libdd-data-pipeline/src/trace_exporter/mod.rs#L119-L133

## Reason for change

Service discovery needs process tags and container ID in the tracer
metadata to fully identify services running in containerized
environments.

## Implementation details

- Add `ProcessTags` and `ContainerId` parameters to
`StoreTracerMetadata`
- Pass `ProcessTags.SerializedTags` (when `PropagateProcessTags` is
enabled) and `ContainerMetadata.Instance.ContainerId` to the metadata
store
- A TODO remains to source process tags from `MutableSettings` after
#8106 is merged

## Test coverage

No new tests — this wires existing values (`ProcessTags`,
`ContainerMetadata`) into an existing code path.

## Other details
<!-- Fixes #{issue} -->


<!--  ⚠️ Note:

Where possible, please obtain 2 approvals prior to merging. Unless
CODEOWNERS specifies otherwise, for external teams it is typically best
to have one review from a team member, and one review from apm-dotnet.
Trivial changes do not require 2 reviews.

MergeQueue is NOT enabled in this repository. If you have write access
to the repo, the PR has 1-2 approvals (see above), and all of the
required checks have passed, you can use the Squash and Merge button to
merge the PR. If you don't have write access, or you need help, reach
out in the #apm-dotnet channel in Slack.
-->

@robcarlan-datadog robcarlan-datadog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM for DSM

@vandonr vandonr enabled auto-merge (squash) March 19, 2026 16:46
@vandonr vandonr merged commit aafcc5f into master Mar 19, 2026
142 of 143 checks passed
@vandonr vandonr deleted the pierre/tags branch March 19, 2026 21:03
@github-actions github-actions Bot added this to the vNext-v3 milestone Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants