Skip to content
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

[Debugger] Don't redact env tokens from probe snapshots #6553

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

watson
Copy link
Contributor

@watson watson commented Jan 15, 2025

Summary of changes

Remove env from list of tokens to redact from Dynamic Instrumentation probe snapshots.

Depends on: DataDog/system-tests#3827

Reason for change

Feature parity

Implementation details

Test coverage

Other details

@watson watson requested a review from a team as a code owner January 15, 2025 14:49
@github-actions github-actions bot added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:debugger labels Jan 15, 2025
@andrewlock
Copy link
Member

andrewlock commented Jan 15, 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 (6553) - mean (69ms)  : 66, 72
     .   : milestone, 69,
    master - mean (69ms)  : 66, 72
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6553) - mean (989ms)  : 960, 1018
     .   : milestone, 989,
    master - mean (981ms)  : 959, 1004
     .   : milestone, 981,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6553) - mean (108ms)  : 106, 110
     .   : milestone, 108,
    master - mean (108ms)  : 106, 110
     .   : milestone, 108,

    section CallTarget+Inlining+NGEN
    This PR (6553) - mean (680ms)  : 664, 696
     .   : milestone, 680,
    master - mean (680ms)  : 662, 698
     .   : milestone, 680,

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

    section CallTarget+Inlining+NGEN
    This PR (6553) - mean (636ms)  : 617, 655
     .   : milestone, 636,
    master - mean (637ms)  : 617, 657
     .   : milestone, 637,

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

    section CallTarget+Inlining+NGEN
    This PR (6553) - mean (1,093ms)  : 1056, 1131
     .   : milestone, 1093,
    master - mean (1,091ms)  : 1062, 1119
     .   : milestone, 1091,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6553) - mean (276ms)  : 270, 281
     .   : milestone, 276,
    master - mean (276ms)  : 271, 280
     .   : milestone, 276,

    section CallTarget+Inlining+NGEN
    This PR (6553) - mean (867ms)  : 840, 895
     .   : milestone, 867,
    master - mean (865ms)  : 838, 892
     .   : milestone, 865,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6553) - mean (264ms)  : 260, 269
     .   : milestone, 264,
    master - mean (263ms)  : 259, 267
     .   : milestone, 263,

    section CallTarget+Inlining+NGEN
    This PR (6553) - mean (846ms)  : 819, 873
     .   : milestone, 846,
    master - mean (844ms)  : 813, 875
     .   : milestone, 844,

Loading

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jan 15, 2025

Datadog Report

Branch report: watson/env-redaction
Commit report: 93ebc93
Test service: dd-trace-dotnet

✅ 0 Failed, 252636 Passed, 2835 Skipped, 32h 22m 27.46s Total Time

@watson
Copy link
Contributor Author

watson commented Jan 15, 2025

The upstream PR to system-tests has been merged, so re-running the system-tests should produce better results. I don't think I have permissions to do that on Azure? Can someone else from the .NET guild help out by re-running them?

@andrewlock
Copy link
Member

Benchmarks Report for tracer 🐌

Benchmarks for #6553 compared to master:

  • 2 benchmarks are faster, with geometric mean 1.162
  • All benchmarks have the same 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.94μs 44.4ns 281ns 0.0121 0.00402 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10μs 54.7ns 314ns 0.0151 0.00504 0 5.81 KB
master StartStopWithChild net472 16.4μs 53.2ns 206ns 1.05 0.312 0.0986 6.21 KB
#6553 StartStopWithChild net6.0 7.88μs 44.6ns 312ns 0.0167 0.00834 0 5.62 KB
#6553 StartStopWithChild netcoreapp3.1 10.1μs 57.4ns 414ns 0.0195 0.00974 0 5.8 KB
#6553 StartStopWithChild net472 16.3μs 48.5ns 188ns 1.05 0.322 0.105 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 476μs 288ns 1.11μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 670μs 684ns 2.56μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 859μs 628ns 2.35μs 0.425 0 0 3.3 KB
#6553 WriteAndFlushEnrichedTraces net6.0 488μs 565ns 2.19μs 0 0 0 2.7 KB
#6553 WriteAndFlushEnrichedTraces netcoreapp3.1 653μs 300ns 1.12μs 0 0 0 2.7 KB
#6553 WriteAndFlushEnrichedTraces net472 856μs 720ns 2.79μs 0.422 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6553

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.AspNetCoreBenchmark.SendRequest‑netcoreapp3.1 1.158 201,765.77 174,250.98

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 156μs 1.1μs 10.9μs 0.143 0 0 14.47 KB
master SendRequest netcoreapp3.1 204μs 2.32μs 23.2μs 0.185 0 0 17.27 KB
master SendRequest net472 0.00721ns 0.00193ns 0.00746ns 0 0 0 0 b
#6553 SendRequest net6.0 158μs 990ns 9.8μs 0.143 0 0 14.47 KB
#6553 SendRequest netcoreapp3.1 175μs 1.03μs 9.45μs 0.178 0 0 17.27 KB
#6553 SendRequest net472 0.00132ns 0.00062ns 0.0024ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 654μs 6.97μs 69μs 0.573 0 0 41.69 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 687μs 3.59μs 24.3μs 0.345 0 0 41.76 KB
master WriteAndFlushEnrichedTraces net472 822μs 4.05μs 17.2μs 8.47 2.42 0.403 53.29 KB
#6553 WriteAndFlushEnrichedTraces net6.0 597μs 3.46μs 31.3μs 0.556 0 0 41.59 KB
#6553 WriteAndFlushEnrichedTraces netcoreapp3.1 708μs 4.03μs 28.8μs 0.372 0 0 41.94 KB
#6553 WriteAndFlushEnrichedTraces net472 839μs 3.9μs 15.1μs 8.33 2.5 0.417 53.29 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.33μs 1.87ns 7.24ns 0.0141 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.71μs 1.62ns 6.27ns 0.0139 0 0 1.02 KB
master ExecuteNonQuery net472 2.1μs 2.53ns 9.81ns 0.156 0.00104 0 987 B
#6553 ExecuteNonQuery net6.0 1.38μs 0.864ns 3.12ns 0.0141 0 0 1.02 KB
#6553 ExecuteNonQuery netcoreapp3.1 1.74μs 1.75ns 6.05ns 0.0141 0 0 1.02 KB
#6553 ExecuteNonQuery net472 2.13μs 2.79ns 10.8ns 0.156 0.00105 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6553

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 1.165 1,316.46 1,129.73

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.32μs 0.804ns 3.12ns 0.0135 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.49μs 0.668ns 2.59ns 0.0134 0 0 976 B
master CallElasticsearch net472 2.6μs 2.17ns 8.42ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.29μs 0.967ns 3.62ns 0.0129 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.61μs 0.926ns 3.46ns 0.0136 0 0 1.02 KB
master CallElasticsearchAsync net472 2.64μs 1.53ns 5.94ns 0.166 0 0 1.05 KB
#6553 CallElasticsearch net6.0 1.13μs 0.44ns 1.65ns 0.0139 0 0 976 B
#6553 CallElasticsearch netcoreapp3.1 1.58μs 0.402ns 1.5ns 0.0133 0 0 976 B
#6553 CallElasticsearch net472 2.55μs 1.75ns 6.32ns 0.158 0 0 995 B
#6553 CallElasticsearchAsync net6.0 1.3μs 0.653ns 2.53ns 0.013 0 0 952 B
#6553 CallElasticsearchAsync netcoreapp3.1 1.59μs 2.68ns 10ns 0.0134 0 0 1.02 KB
#6553 CallElasticsearchAsync net472 2.72μs 1.1ns 4.25ns 0.167 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.3μs 4.63ns 17.9ns 0.013 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.63μs 0.702ns 2.63ns 0.0122 0 0 952 B
master ExecuteAsync net472 1.87μs 0.41ns 1.48ns 0.145 0 0 915 B
#6553 ExecuteAsync net6.0 1.37μs 0.737ns 2.66ns 0.0131 0 0 952 B
#6553 ExecuteAsync netcoreapp3.1 1.61μs 1.16ns 4.51ns 0.013 0 0 952 B
#6553 ExecuteAsync net472 1.77μs 0.271ns 1.01ns 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.53μs 5.58ns 19.3ns 0.0315 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.43μs 1.93ns 7.47ns 0.0379 0 0 2.85 KB
master SendAsync net472 7.36μs 1.75ns 6.77ns 0.493 0 0 3.12 KB
#6553 SendAsync net6.0 4.57μs 1.74ns 6.03ns 0.0319 0 0 2.31 KB
#6553 SendAsync netcoreapp3.1 5.3μs 3.66ns 13.2ns 0.0374 0 0 2.85 KB
#6553 SendAsync net472 7.52μs 1.5ns 5.81ns 0.495 0 0 3.12 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.61μs 1.03ns 3.86ns 0.0225 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.25μs 1.26ns 4.54ns 0.0225 0 0 1.64 KB
master EnrichedLog net472 2.7μs 1.02ns 3.83ns 0.249 0 0 1.57 KB
#6553 EnrichedLog net6.0 1.47μs 0.756ns 2.83ns 0.0233 0 0 1.64 KB
#6553 EnrichedLog netcoreapp3.1 2.18μs 1.09ns 4.07ns 0.0219 0 0 1.64 KB
#6553 EnrichedLog net472 2.62μs 1.35ns 5.04ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 119μs 108ns 405ns 0 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 123μs 290ns 1.09μs 0 0 0 4.28 KB
master EnrichedLog net472 152μs 194ns 752ns 0.682 0.227 0 4.46 KB
#6553 EnrichedLog net6.0 116μs 109ns 423ns 0.058 0 0 4.28 KB
#6553 EnrichedLog netcoreapp3.1 119μs 81.1ns 281ns 0 0 0 4.28 KB
#6553 EnrichedLog net472 151μs 144ns 556ns 0.676 0.225 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.94μs 0.799ns 2.88ns 0.0309 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.04μs 1.19ns 4.44ns 0.0282 0 0 2.2 KB
master EnrichedLog net472 4.86μs 0.842ns 3.26ns 0.321 0 0 2.02 KB
#6553 EnrichedLog net6.0 3μs 1.23ns 4.75ns 0.0306 0 0 2.2 KB
#6553 EnrichedLog netcoreapp3.1 4.26μs 6.85ns 26.5ns 0.0279 0 0 2.2 KB
#6553 EnrichedLog net472 4.96μs 1.25ns 4.84ns 0.319 0 0 2.02 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.3μs 1.1ns 4.27ns 0.0163 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.82μs 1.03ns 3.97ns 0.0154 0 0 1.14 KB
master SendReceive net472 2.08μs 2.21ns 8.57ns 0.183 0 0 1.16 KB
#6553 SendReceive net6.0 1.31μs 0.559ns 2.09ns 0.0157 0 0 1.14 KB
#6553 SendReceive netcoreapp3.1 1.7μs 0.931ns 3.61ns 0.0154 0 0 1.14 KB
#6553 SendReceive net472 2.01μs 1.48ns 5.72ns 0.183 0 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.6μs 1.31ns 5.07ns 0.022 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.9μs 2.08ns 8.04ns 0.0215 0 0 1.65 KB
master EnrichedLog net472 4.38μs 2.35ns 8.46ns 0.323 0 0 2.04 KB
#6553 EnrichedLog net6.0 2.85μs 0.944ns 3.66ns 0.0214 0 0 1.6 KB
#6553 EnrichedLog netcoreapp3.1 3.86μs 4.04ns 15.6ns 0.0211 0 0 1.65 KB
#6553 EnrichedLog net472 4.51μs 3.68ns 14.3ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 469ns 0.271ns 1.05ns 0.00801 0 0 576 B
master StartFinishSpan netcoreapp3.1 582ns 0.433ns 1.62ns 0.0079 0 0 576 B
master StartFinishSpan net472 719ns 0.535ns 2.07ns 0.0916 0 0 578 B
master StartFinishScope net6.0 541ns 0.306ns 1.14ns 0.00971 0 0 696 B
master StartFinishScope netcoreapp3.1 691ns 0.667ns 2.5ns 0.00928 0 0 696 B
master StartFinishScope net472 921ns 0.728ns 2.72ns 0.104 0 0 658 B
#6553 StartFinishSpan net6.0 455ns 0.321ns 1.24ns 0.00816 0 0 576 B
#6553 StartFinishSpan netcoreapp3.1 576ns 0.3ns 1.16ns 0.00775 0 0 576 B
#6553 StartFinishSpan net472 671ns 0.546ns 2.11ns 0.0915 0 0 578 B
#6553 StartFinishScope net6.0 504ns 0.233ns 0.904ns 0.00986 0 0 696 B
#6553 StartFinishScope netcoreapp3.1 720ns 0.632ns 2.45ns 0.00944 0 0 696 B
#6553 StartFinishScope net472 847ns 0.968ns 3.75ns 0.104 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 605ns 0.39ns 1.51ns 0.0096 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 977ns 0.352ns 1.36ns 0.00953 0 0 696 B
master RunOnMethodBegin net472 1.08μs 0.39ns 1.51ns 0.104 0 0 658 B
#6553 RunOnMethodBegin net6.0 592ns 0.37ns 1.33ns 0.00966 0 0 696 B
#6553 RunOnMethodBegin netcoreapp3.1 899ns 0.502ns 1.95ns 0.00958 0 0 696 B
#6553 RunOnMethodBegin net472 1.14μs 0.697ns 2.7ns 0.105 0 0 658 B

@dudikeleti dudikeleti force-pushed the watson/env-redaction branch 2 times, most recently from d3db31a to ca79f49 Compare January 16, 2025 11:19
@dudikeleti dudikeleti force-pushed the watson/env-redaction branch from ca79f49 to 93ebc93 Compare January 16, 2025 12:14
@dudikeleti dudikeleti merged commit 282d5fe into master Jan 17, 2025
68 of 73 checks passed
@dudikeleti dudikeleti deleted the watson/env-redaction branch January 17, 2025 06:38
@github-actions github-actions bot added this to the vNext-v3 milestone Jan 17, 2025
@andrewlock andrewlock removed the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants