Add continous profiler checks to dd-trace#3167
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
andrewlock
left a comment
There was a problem hiding this comment.
LGTM, couple of minor comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2a1d19a to
d94acb0
Compare
This comment has been minimized.
This comment has been minimized.
| bool isContinuousProfilerEnabled; | ||
|
|
||
| if (profilerModule == null) | ||
| if (process.EnvironmentVariables.TryGetValue("DD_PROFILING_ENABLED", out var profilingEnabled)) |
There was a problem hiding this comment.
You might want to run all of the ContinuousProfiler checks after identifying the loader module and the native tracer module because these console messages aren't actionable if the profiler isn't a part of the product they installed
| var loaderModule = FindLoader(process); | ||
| var nativeTracerModule = FindNativeTracerModule(process, loaderModule != null); | ||
|
|
||
| if (loaderModule == null) |
There was a problem hiding this comment.
If the user is running a pretty old (pre-loader DLL), then the loader isn't relevant and the user could get concerned over this message. What about strengthening the check like this?
| if (loaderModule == null) | |
| if (loaderModule == null && (nativeTracerModule?.StartsWith("Datadog.Tracer.Native", StringComparison.OrdinalIgnoreCase) ?? true)) |
d94acb0 to
746f523
Compare
746f523 to
1757dc4
Compare
This comment has been minimized.
This comment has been minimized.
Benchmarks Report 🐌Benchmarks for #3167 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️Raw results
|
Code Coverage Report 📊✔️ Merging #3167 into master will will increase line coverage by
View the full report for further details: Datadog.Trace Breakdown ✔️
The following classes have significant coverage changes.
The following classes were added in #3167:
View the full reports for further details: |
Summary of changes
Add checks for the continuous profiler in the diagnostic tool.
Reason for change
Implementation details
Those checks are only run if
DD_PROFILING_ENABLEDis set, to avoid false-negatives.We verify that:
LD_PRELOADis set to a correct path (Linux only)Test coverage
The new tests run only on Linux.