Skip to content

CLI - Display the version of the profiler and tracer#2594

Merged
kevingosse merged 2 commits into
masterfrom
kevin/cli_showversion
Apr 7, 2022
Merged

CLI - Display the version of the profiler and tracer#2594
kevingosse merged 2 commits into
masterfrom
kevin/cli_showversion

Conversation

@kevingosse

Copy link
Copy Markdown
Contributor

When the tracer and/or the profiler are detected in the target process, display the version number even if there is no conflict. This could be useful if the output is copy/pasted to support.

Also, change "profiler" to "native library" in messages.

@kevingosse kevingosse added type:enhancement Improvement to an existing feature area:tools labels Mar 24, 2022
@kevingosse
kevingosse requested a review from a team as a code owner March 24, 2022 13:34
@kevingosse
kevingosse force-pushed the kevin/cli_showversion branch from 2582102 to cd9bcfc Compare March 29, 2022 09:54
@andrewlock

This comment has been minimized.

@kevingosse
kevingosse force-pushed the kevin/cli_showversion branch from cd9bcfc to 7ab4d94 Compare March 31, 2022 12:28
@andrewlock

This comment has been minimized.

@kevingosse
kevingosse force-pushed the kevin/cli_showversion branch from 5c669c0 to ff72479 Compare April 5, 2022 10:25
@andrewlock

This comment has been minimized.

@kevingosse
kevingosse force-pushed the kevin/cli_showversion branch from ff72479 to 653414c Compare April 6, 2022 08:54
@kevingosse
kevingosse force-pushed the kevin/cli_showversion branch from 653414c to e7d1427 Compare April 6, 2022 08:57
@andrewlock

Copy link
Copy Markdown
Member

Benchmarks Report 🐌

Benchmarks for #2594 compared to master:

  • All benchmarks have the same speed
  • 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.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net472 973μs 5.4μs 35μs 0 0 0 3.17 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 720μs 2.93μs 11.4μs 0 0 0 2.57 KB
#2594 WriteAndFlushEnrichedTraces net472 1ms 5.76μs 46.4μs 0 0 0 3.16 KB
#2594 WriteAndFlushEnrichedTraces netcoreapp3.1 758μs 3.67μs 16μs 0 0 0 2.57 KB
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net472 309ns 1.66ns 12.4ns 0.052 0 0 329 B
master AllCycleSimpleBody netcoreapp3.1 374ns 0.805ns 3.01ns 0.00451 0 0 328 B
master AllCycleMoreComplexBody net472 298ns 0.9ns 3.48ns 0.0482 0 0 305 B
master AllCycleMoreComplexBody netcoreapp3.1 396ns 2.28ns 18.1ns 0.00415 0 0 304 B
master BodyExtractorSimpleBody net472 439ns 1.36ns 4.91ns 0.057 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 463ns 1.77ns 6.64ns 0.0037 0 0 272 B
master BodyExtractorMoreComplexBody net472 24.8μs 93.5ns 362ns 1.18 0.0125 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 21.4μs 99.3ns 385ns 0.0936 0 0 6.75 KB
#2594 AllCycleSimpleBody net472 304ns 1.39ns 5.38ns 0.052 0 0 329 B
#2594 AllCycleSimpleBody netcoreapp3.1 388ns 0.893ns 3.22ns 0.00446 0 0 328 B
#2594 AllCycleMoreComplexBody net472 308ns 1.74ns 11.1ns 0.0481 0 0 305 B
#2594 AllCycleMoreComplexBody netcoreapp3.1 374ns 0.927ns 3.47ns 0.00428 0 0 304 B
#2594 BodyExtractorSimpleBody net472 443ns 1.74ns 6.74ns 0.0571 0 0 361 B
#2594 BodyExtractorSimpleBody netcoreapp3.1 449ns 1.76ns 6.59ns 0.00371 0 0 272 B
#2594 BodyExtractorMoreComplexBody net472 25.8μs 138ns 978ns 1.18 0.0123 0 7.62 KB
#2594 BodyExtractorMoreComplexBody netcoreapp3.1 21.8μs 99.6ns 373ns 0.0862 0 0 6.75 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 net472 0ns 0ns 0ns 0 0 0 0 b
master SendRequest netcoreapp3.1 336μs 857ns 3.32μs 0.167 0 0 19.74 KB
#2594 SendRequest net472 0.0158ns 0.00725ns 0.0497ns 0 0 0 0 b
#2594 SendRequest netcoreapp3.1 339μs 932ns 3.49μs 0.169 0 0 19.74 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 net472 1.88μs 10.7ns 77ns 0.0935 0.000899 0 594 B
master ExecuteNonQuery netcoreapp3.1 1.56μs 4.73ns 17.1ns 0.00868 0 0 632 B
#2594 ExecuteNonQuery net472 1.85μs 9.43ns 55ns 0.0938 0 0 594 B
#2594 ExecuteNonQuery netcoreapp3.1 1.56μs 5.86ns 23.4ns 0.00853 0 0 632 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net472 2.77μs 14.8ns 76.9ns 0.127 0 0 803 B
master CallElasticsearch netcoreapp3.1 1.99μs 11.6ns 97.5ns 0.0112 0 0 792 B
master CallElasticsearchAsync net472 3.03μs 13.6ns 52.5ns 0.148 0.00153 0 939 B
master CallElasticsearchAsync netcoreapp3.1 1.97μs 9.8ns 62.7ns 0.0127 0 0 912 B
#2594 CallElasticsearch net472 2.96μs 10.2ns 39.6ns 0.127 0 0 803 B
#2594 CallElasticsearch netcoreapp3.1 1.75μs 7.87ns 27.3ns 0.0112 0 0 792 B
#2594 CallElasticsearchAsync net472 3.05μs 8.92ns 33.4ns 0.149 0 0 939 B
#2594 CallElasticsearchAsync netcoreapp3.1 1.89μs 9.27ns 40.4ns 0.0121 0 0 912 B
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net472 3.38μs 19.3ns 135ns 0.166 0 0 1.06 KB
master ExecuteAsync netcoreapp3.1 2.11μs 7.43ns 28.8ns 0.0147 0 0 1.03 KB
#2594 ExecuteAsync net472 3.21μs 9.89ns 37ns 0.167 0 0 1.06 KB
#2594 ExecuteAsync netcoreapp3.1 2.19μs 10.3ns 38.6ns 0.0141 0 0 1.03 KB
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net472 7.45μs 42.7ns 319ns 0.356 0 0 2.28 KB
master SendAsync netcoreapp3.1 4.85μs 18.2ns 70.6ns 0.0308 0 0 2.21 KB
#2594 SendAsync net472 7.14μs 16.4ns 57ns 0.361 0 0 2.28 KB
#2594 SendAsync netcoreapp3.1 4.99μs 19.6ns 73.4ns 0.0293 0 0 2.21 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 net472 3.52μs 9.94ns 37.2ns 0.228 0 0 1.45 KB
master EnrichedLog netcoreapp3.1 3.14μs 10.1ns 39.2ns 0.0203 0 0 1.53 KB
#2594 EnrichedLog net472 3.71μs 21.6ns 184ns 0.228 0 0 1.45 KB
#2594 EnrichedLog netcoreapp3.1 3.19μs 15.4ns 61.6ns 0.0205 0 0 1.53 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 net472 302μs 1.11μs 3.86μs 0.443 0.148 0 4.33 KB
master EnrichedLog netcoreapp3.1 246μs 1.41μs 10μs 0 0 0 4.21 KB
#2594 EnrichedLog net472 305μs 1.11μs 4.29μs 0.333 0.167 0 4.33 KB
#2594 EnrichedLog netcoreapp3.1 241μs 958ns 4.69μs 0 0 0 4.21 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 net472 8.14μs 40.3ns 201ns 0.502 0 0 3.23 KB
master EnrichedLog netcoreapp3.1 7.17μs 19.9ns 74.5ns 0.0504 0 0 3.6 KB
#2594 EnrichedLog net472 8.05μs 29.1ns 113ns 0.503 0 0 3.23 KB
#2594 EnrichedLog netcoreapp3.1 6.7μs 17.7ns 61.4ns 0.0496 0 0 3.6 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 net472 2.59μs 14.6ns 94.6ns 0.158 0 0 1.01 KB
master SendReceive netcoreapp3.1 2.11μs 9.07ns 35.1ns 0.0137 0 0 1.01 KB
#2594 SendReceive net472 2.7μs 14ns 71.4ns 0.16 0.00146 0 1.01 KB
#2594 SendReceive netcoreapp3.1 2.11μs 5.89ns 20.4ns 0.0134 0 0 1.01 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 net472 6.42μs 33.9ns 258ns 0.291 0 0 1.87 KB
master EnrichedLog netcoreapp3.1 5.38μs 19.2ns 69.4ns 0.0188 0 0 1.49 KB
#2594 EnrichedLog net472 6.31μs 26.5ns 95.4ns 0.291 0 0 1.87 KB
#2594 EnrichedLog netcoreapp3.1 5.27μs 19.5ns 75.7ns 0.021 0 0 1.49 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 net472 936ns 4.04ns 16.2ns 0.0718 0 0 457 B
master StartFinishSpan netcoreapp3.1 904ns 3.94ns 14.7ns 0.00626 0 0 456 B
master StartFinishScope net472 1.18μs 5.39ns 20.9ns 0.0844 0 0 538 B
master StartFinishScope netcoreapp3.1 1.13μs 6.57ns 59.5ns 0.00786 0 0 576 B
#2594 StartFinishSpan net472 958ns 4.99ns 24.5ns 0.0716 0 0 457 B
#2594 StartFinishSpan netcoreapp3.1 963ns 5.41ns 35.9ns 0.00623 0 0 456 B
#2594 StartFinishScope net472 1.19μs 6.71ns 43ns 0.0845 0 0 538 B
#2594 StartFinishScope netcoreapp3.1 1.09μs 6.35ns 56.4ns 0.00777 0 0 576 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 net472 1.45μs 7.29ns 34.9ns 0.0843 0 0 538 B
master RunOnMethodBegin netcoreapp3.1 1.23μs 6.7ns 43.4ns 0.00804 0 0 576 B
#2594 RunOnMethodBegin net472 1.34μs 3.73ns 13.4ns 0.0844 0 0 538 B
#2594 RunOnMethodBegin netcoreapp3.1 1.22μs 6.89ns 48.2ns 0.00773 0 0 576 B


public static string ProfilerVersion(string version) => $"The native library version {version} is loaded into the process.";

public static string TracerVersion(string version) => $"The tracer version {version} is loaded into the process.";

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.

Should we use "managed library" to be consistent with "native library". Or, to be more precise

  • native tracer library
  • managed tracer library

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't mind either way. We can do the change in another PR if you feel strongly about it 🙂 (this one has been rebased too many times already 😅 )

@andrewlock

Copy link
Copy Markdown
Member

Code Coverage Report 📊

✔️ Merging #2594 into master will not change line coverage
✔️ Merging #2594 into master will not change branch coverage
✔️ Merging #2594 into master will not change complexity

master #2594 Change
Lines 13480 / 18464 13441 / 18464
Lines % 73% 73% 0% ✔️
Branches 7798 / 11017 7779 / 11017
Branches % 71% 71% 0% ✔️
Complexity 12307 12307 0 ✔️

View the full report for further details:

Datadog.Trace Breakdown ✔️

master #2594 Change
Lines % 73% 73% 0% ✔️
Branches % 71% 71% 0% ✔️
Complexity 12307 12307 0 ✔️

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.Telemetry.JsonHttpClientTelemetryTransport 26% ✔️ 38% ✔️ 0 ✔️

View the full reports for further details:

@kevingosse
kevingosse merged commit ccaecca into master Apr 7, 2022
@kevingosse
kevingosse deleted the kevin/cli_showversion branch April 7, 2022 10:13
@github-actions github-actions Bot added this to the vNext milestone Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tools type:enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants