Skip to content

[Tracing] Update the default value of DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED to true #6751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 19, 2025

Conversation

zacharycmontoya
Copy link
Contributor

@zacharycmontoya zacharycmontoya commented Mar 7, 2025

Summary of changes

Updates the default value of the DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED configuration from false to true.

Before: Automatic logs injection, by default, injects the trace-id as a decimal number representing the lower 64-bits of the trace-id, regardless if the trace-id had a 128-bit or 64-bit value.

Now: Automatic logs injection, by default, injects the trace-id as a 32-character hexadecimal number representing the 128-bit value when the trace-id is a 128-bit value and as a decimal number when the trace-id is a 64-bit value.

This also implements a new behavior so when DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED=false, then DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED will default to false, unless overridden by user configuration.

Reason for change

We have long supported the correlation of 128-bit trace-ids in logs to their respective spans. Now we are standardizing the behavior of the tracing libraries to consistently inject 128-bit trace-ids as their full hexadecimal values.

Implementation details

At a technical level, this only changes the default value of the DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED flag. This changes the value from a constant false to the value of the DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED.

Test coverage

Unit tests have been updated to account for the new configuration default value.

End-to-end tests have been conducted locally with the LogsInjection.Serilog test application and logs correlation continues to work as expected.

Other details

…to true.

At a technical level, its default value is set to match the value of DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED, so if DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED is manually set to false, so will DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED.
@zacharycmontoya zacharycmontoya requested a review from a team as a code owner March 7, 2025 21:27
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Mar 7, 2025

Datadog Report

Branch report: zach.montoya/128-bit-traceid-default
Commit report: be73e95
Test service: dd-trace-dotnet

✅ 0 Failed, 251675 Passed, 2413 Skipped, 20h 39m 21.02s Total Time

@andrewlock
Copy link
Member

andrewlock commented Mar 7, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

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 shown 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).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6751) - mean (69ms)  : 66, 72
     .   : milestone, 69,
    master - mean (70ms)  : 67, 73
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (6751) - mean (1,008ms)  : 987, 1029
     .   : milestone, 1008,
    master - mean (1,006ms)  : 977, 1035
     .   : milestone, 1006,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6751) - mean (103ms)  : 100, 105
     .   : milestone, 103,
    master - mean (103ms)  : 101, 105
     .   : milestone, 103,

    section CallTarget+Inlining+NGEN
    This PR (6751) - mean (688ms)  : 672, 705
     .   : milestone, 688,
    master - mean (692ms)  : 677, 708
     .   : milestone, 692,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6751) - mean (89ms)  : 87, 91
     .   : milestone, 89,
    master - mean (90ms)  : 88, 92
     .   : milestone, 90,

    section CallTarget+Inlining+NGEN
    This PR (6751) - mean (637ms)  : 621, 653
     .   : milestone, 637,
    master - mean (643ms)  : 627, 660
     .   : milestone, 643,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6751) - mean (190ms)  : 185, 194
     .   : milestone, 190,
    master - mean (190ms)  : 186, 193
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (6751) - mean (1,109ms)  : 1074, 1144
     .   : milestone, 1109,
    master - mean (1,108ms)  : 1084, 1132
     .   : milestone, 1108,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6751) - mean (268ms)  : 264, 272
     .   : milestone, 268,
    master - mean (269ms)  : 266, 273
     .   : milestone, 269,

    section CallTarget+Inlining+NGEN
    This PR (6751) - mean (872ms)  : 843, 902
     .   : milestone, 872,
    master - mean (878ms)  : 844, 911
     .   : milestone, 878,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6751) - mean (262ms)  : 258, 265
     .   : milestone, 262,
    master - mean (263ms)  : 259, 266
     .   : milestone, 263,

    section CallTarget+Inlining+NGEN
    This PR (6751) - mean (854ms)  : 823, 886
     .   : milestone, 854,
    master - mean (860ms)  : 824, 896
     .   : milestone, 860,

Loading

@bouwkast
Copy link
Collaborator

bouwkast commented Mar 7, 2025

😬
I think I forgot to update and run those VersionConflict tests when I merged the 128-bit log injection
e.g. NLog10VersionConflict2xTests.InjectsLogsWhenEnabled

@andrewlock
Copy link
Member

andrewlock commented Mar 7, 2025

Benchmarks Report for tracer 🐌

Benchmarks for #6751 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.121
  • 4 benchmarks are slower, with geometric mean 1.131
  • 13 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.92μs 44.7ns 329ns 0.012 0.00399 0 5.61 KB
master StartStopWithChild netcoreapp3.1 9.97μs 56.5ns 419ns 0.0192 0.00962 0 5.8 KB
master StartStopWithChild net472 16.2μs 49.9ns 193ns 1.04 0.309 0.0975 6.2 KB
#6751 StartStopWithChild net6.0 8.09μs 46.3ns 373ns 0.0157 0.00783 0 5.61 KB
#6751 StartStopWithChild netcoreapp3.1 10.6μs 60.4ns 419ns 0.0208 0.0104 0 5.8 KB
#6751 StartStopWithChild net472 16.9μs 51.5ns 199ns 1.04 0.318 0.092 6.2 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 508μs 2.44μs 9.76μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 653μs 882ns 3.41μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 843μs 1.48μs 5.73μs 0.417 0 0 3.3 KB
#6751 WriteAndFlushEnrichedTraces net6.0 523μs 403ns 1.56μs 0 0 0 2.7 KB
#6751 WriteAndFlushEnrichedTraces netcoreapp3.1 652μs 694ns 2.69μs 0 0 0 2.7 KB
#6751 WriteAndFlushEnrichedTraces net472 849μs 692ns 2.68μs 0.428 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 127μs 484ns 1.87μs 0.188 0 0 14.47 KB
master SendRequest netcoreapp3.1 143μs 440ns 1.7μs 0.214 0 0 17.27 KB
master SendRequest net472 0.000176ns 0.000101ns 0.000391ns 0 0 0 0 b
#6751 SendRequest net6.0 132μs 517ns 2μs 0.2 0 0 14.47 KB
#6751 SendRequest netcoreapp3.1 144μs 279ns 1.05μs 0.216 0 0 17.27 KB
#6751 SendRequest net472 0.000908ns 0.000345ns 0.00129ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #6751

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.44 KB 41.69 KB 251 B 0.61%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 540μs 2.6μs 10.1μs 0.561 0 0 41.44 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 712μs 4.18μs 41.2μs 0.34 0 0 41.82 KB
master WriteAndFlushEnrichedTraces net472 847μs 4.43μs 22.6μs 8.45 2.53 0.422 53.29 KB
#6751 WriteAndFlushEnrichedTraces net6.0 610μs 4.09μs 40.3μs 0.616 0 0 41.69 KB
#6751 WriteAndFlushEnrichedTraces netcoreapp3.1 774μs 7.99μs 79.5μs 0.361 0 0 41.78 KB
#6751 WriteAndFlushEnrichedTraces net472 871μs 4.03μs 15.6μs 8.13 2.57 0.428 53.3 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.28μs 1.63ns 6.32ns 0.0141 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.75μs 1.94ns 7.51ns 0.0131 0 0 1.02 KB
master ExecuteNonQuery net472 2.03μs 2.52ns 9.76ns 0.157 0.00101 0 987 B
#6751 ExecuteNonQuery net6.0 1.27μs 1.22ns 4.73ns 0.014 0 0 1.02 KB
#6751 ExecuteNonQuery netcoreapp3.1 1.73μs 1.84ns 6.89ns 0.0138 0 0 1.02 KB
#6751 ExecuteNonQuery net472 2.1μs 3.21ns 12.4ns 0.156 0.00105 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6751

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 1.114 1,151.01 1,282.10

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.24μs 0.375ns 1.45ns 0.0137 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.61μs 1.04ns 4.04ns 0.0129 0 0 976 B
master CallElasticsearch net472 2.61μs 2.29ns 8.58ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.15μs 1.35ns 5.07ns 0.0129 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.69μs 1.15ns 4.45ns 0.0136 0 0 1.02 KB
master CallElasticsearchAsync net472 2.7μs 1.13ns 4.09ns 0.167 0 0 1.05 KB
#6751 CallElasticsearch net6.0 1.15μs 0.437ns 1.63ns 0.0133 0 0 976 B
#6751 CallElasticsearch netcoreapp3.1 1.57μs 1.23ns 4.76ns 0.0134 0 0 976 B
#6751 CallElasticsearch net472 2.59μs 1.45ns 5.6ns 0.158 0 0 995 B
#6751 CallElasticsearchAsync net6.0 1.28μs 0.344ns 1.24ns 0.0134 0 0 952 B
#6751 CallElasticsearchAsync netcoreapp3.1 1.71μs 1.32ns 4.95ns 0.0137 0 0 1.02 KB
#6751 CallElasticsearchAsync net472 2.68μs 2.03ns 7.87ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.36μs 0.844ns 3.16ns 0.0131 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.69μs 0.398ns 1.38ns 0.0127 0 0 952 B
master ExecuteAsync net472 1.77μs 0.702ns 2.72ns 0.145 0 0 915 B
#6751 ExecuteAsync net6.0 1.27μs 0.504ns 1.82ns 0.0135 0 0 952 B
#6751 ExecuteAsync netcoreapp3.1 1.65μs 1.28ns 4.62ns 0.0123 0 0 952 B
#6751 ExecuteAsync net472 1.81μs 0.823ns 3.19ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.4μs 1.38ns 5.17ns 0.0306 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.34μs 4.08ns 15.3ns 0.0379 0 0 2.85 KB
master SendAsync net472 7.53μs 1.49ns 5.56ns 0.495 0 0 3.12 KB
#6751 SendAsync net6.0 4.3μs 1.79ns 6.7ns 0.0323 0 0 2.31 KB
#6751 SendAsync netcoreapp3.1 5.48μs 2.08ns 7.79ns 0.0385 0 0 2.85 KB
#6751 SendAsync net472 7.37μs 1.55ns 6ns 0.496 0 0 3.12 KB
Benchmarks.Trace.ILoggerBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #6751

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 1.133 1,431.63 1,622.34

More allocations ⚠️ in #6751

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net472 1.57 KB 1.62 KB 53 B 3.37%
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑net6.0 1.64 KB 1.69 KB 50 B 3.05%
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑netcoreapp3.1 1.64 KB 1.69 KB 50 B 3.05%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.43μs 0.873ns 3.27ns 0.0229 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.24μs 1.46ns 5.66ns 0.0223 0 0 1.64 KB
master EnrichedLog net472 2.65μs 0.672ns 2.42ns 0.249 0 0 1.57 KB
#6751 EnrichedLog net6.0 1.62μs 0.759ns 2.84ns 0.0236 0 0 1.69 KB
#6751 EnrichedLog netcoreapp3.1 2.26μs 8.26ns 32ns 0.0223 0 0 1.69 KB
#6751 EnrichedLog net472 2.59μs 3.27ns 12.2ns 0.258 0 0 1.62 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #6751

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑net472 4.46 KB 4.49 KB 29 B 0.65%
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑net6.0 4.28 KB 4.3 KB 24 B 0.56%
Benchmarks.Trace.Log4netBenchmark.EnrichedLog‑netcoreapp3.1 4.28 KB 4.3 KB 24 B 0.56%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 112μs 118ns 455ns 0.0563 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 114μs 242ns 937ns 0.0575 0 0 4.28 KB
master EnrichedLog net472 148μs 189ns 731ns 0.668 0.223 0 4.46 KB
#6751 EnrichedLog net6.0 112μs 119ns 446ns 0.0564 0 0 4.3 KB
#6751 EnrichedLog netcoreapp3.1 118μs 136ns 525ns 0 0 0 4.3 KB
#6751 EnrichedLog net472 150μs 149ns 576ns 0.673 0.224 0 4.49 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #6751

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net472 2.02 KB 2.07 KB 54 B 2.67%
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑net6.0 2.2 KB 2.25 KB 48 B 2.18%
Benchmarks.Trace.NLogBenchmark.EnrichedLog‑netcoreapp3.1 2.2 KB 2.25 KB 48 B 2.18%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 3.09μs 0.67ns 2.42ns 0.0309 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.23μs 1.25ns 4.84ns 0.0293 0 0 2.2 KB
master EnrichedLog net472 4.6μs 2.3ns 8.89ns 0.32 0 0 2.02 KB
#6751 EnrichedLog net6.0 3.04μs 0.983ns 3.81ns 0.0305 0 0 2.25 KB
#6751 EnrichedLog netcoreapp3.1 4.23μs 1.4ns 5.43ns 0.0296 0 0 2.25 KB
#6751 EnrichedLog net472 4.88μs 1.77ns 6.84ns 0.329 0 0 2.07 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.39μs 0.312ns 1.08ns 0.0162 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.89μs 0.876ns 3.39ns 0.0152 0 0 1.14 KB
master SendReceive net472 2.1μs 1.8ns 6.96ns 0.183 0 0 1.16 KB
#6751 SendReceive net6.0 1.3μs 0.582ns 2.18ns 0.0162 0 0 1.14 KB
#6751 SendReceive netcoreapp3.1 1.73μs 2.21ns 8.27ns 0.0156 0 0 1.14 KB
#6751 SendReceive net472 2.12μs 5.11ns 19.8ns 0.183 0 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #6751

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net6.0 1.6 KB 1.62 KB 24 B 1.50%
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑netcoreapp3.1 1.65 KB 1.67 KB 24 B 1.46%
Benchmarks.Trace.SerilogBenchmark.EnrichedLog‑net472 2.04 KB 2.07 KB 29 B 1.42%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.81μs 1.29ns 5ns 0.0225 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.97μs 1.51ns 5.65ns 0.0218 0 0 1.65 KB
master EnrichedLog net472 4.22μs 2.52ns 9.76ns 0.323 0 0 2.04 KB
#6751 EnrichedLog net6.0 2.81μs 0.681ns 2.64ns 0.0225 0 0 1.62 KB
#6751 EnrichedLog netcoreapp3.1 3.94μs 1.52ns 5.67ns 0.0216 0 0 1.67 KB
#6751 EnrichedLog net472 4.43μs 3.12ns 12.1ns 0.328 0 0 2.07 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6751

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.164 486.98 566.66
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.115 404.52 451.15

Faster 🎉 in #6751

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 1.121 665.66 594.02

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 404ns 0.172ns 0.667ns 0.00806 0 0 576 B
master StartFinishSpan netcoreapp3.1 666ns 0.679ns 2.63ns 0.00764 0 0 576 B
master StartFinishSpan net472 598ns 0.157ns 0.609ns 0.0917 0 0 578 B
master StartFinishScope net6.0 487ns 0.195ns 0.731ns 0.00973 0 0 696 B
master StartFinishScope netcoreapp3.1 751ns 0.611ns 2.36ns 0.00925 0 0 696 B
master StartFinishScope net472 899ns 0.279ns 1.08ns 0.104 0 0 658 B
#6751 StartFinishSpan net6.0 452ns 0.484ns 1.87ns 0.00798 0 0 576 B
#6751 StartFinishSpan netcoreapp3.1 592ns 0.935ns 3.62ns 0.00775 0 0 576 B
#6751 StartFinishSpan net472 623ns 2.22ns 8.62ns 0.0917 0 0 578 B
#6751 StartFinishScope net6.0 570ns 2.34ns 9.06ns 0.00987 0 0 696 B
#6751 StartFinishScope netcoreapp3.1 726ns 0.979ns 3.66ns 0.00945 0 0 696 B
#6751 StartFinishScope net472 841ns 0.913ns 3.41ns 0.105 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 651ns 0.967ns 3.74ns 0.00981 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 897ns 1.51ns 5.84ns 0.0094 0 0 696 B
master RunOnMethodBegin net472 1.13μs 0.345ns 1.29ns 0.104 0 0 658 B
#6751 RunOnMethodBegin net6.0 707ns 0.906ns 3.51ns 0.00959 0 0 696 B
#6751 RunOnMethodBegin netcoreapp3.1 937ns 1.5ns 5.79ns 0.00919 0 0 696 B
#6751 RunOnMethodBegin net472 1.15μs 5.35ns 20.7ns 0.104 0 0 658 B

Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

I assume there shouldn't be any implications to changing the default value here right? As-in, changing default values can potentially be breaking changes, but we don't anticipate any issues from enabling this, right?

@zacharycmontoya
Copy link
Contributor Author

I assume there shouldn't be any implications to changing the default value here right? As-in, changing default values can potentially be breaking changes, but we don't anticipate any issues from enabling this, right?

That's correct, we don't anticipate any issues from changing this. The backend is able to correctly parse both types of trace-id's so even though we're changing the format of ID in the log message, the end-to-end result is expected to be unchanged.

@zacharycmontoya zacharycmontoya requested a review from a team as a code owner March 18, 2025 20:51
…ithout 128-bit trace-id injection due to the "version conflict" scenario generating both 64-bit trace-ids and 128-bit trace-ids which complicates the validation.
@zacharycmontoya zacharycmontoya merged commit 744dc94 into master Mar 19, 2025
131 of 134 checks passed
@zacharycmontoya zacharycmontoya deleted the zach.montoya/128-bit-traceid-default branch March 19, 2025 00:40
@github-actions github-actions bot added this to the vNext-v3 milestone Mar 19, 2025
@bouwkast bouwkast added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Mar 24, 2025
ddyurchenko pushed a commit that referenced this pull request Mar 31, 2025
…G_ENABLED to true (#6751)

Updates the default value of the `DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED` configuration from `false` to
`true`.

Before: Automatic logs injection, by default, injects the trace-id as a decimal number representing the lower 64-bits of the trace-id, regardless if the trace-id had a 128-bit or 64-bit value.

Now: Automatic logs injection, by default, injects the trace-id as a 32-character hexadecimal number representing the 128-bit value when the trace-id is a 128-bit value and as a decimal number (same as before) when the trace-id is a 64-bit value.

This also implements a new behavior so when `DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED=false`, then `DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED` will also be configured to `false`, unless explicitly overridden by user configuration.

---------

Co-authored-by: Andrew Lock <[email protected]>
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.

4 participants