Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2680 +/- ##
============================================
- Coverage 79.40% 77.96% -1.44%
Complexity 2212 2212
============================================
Files 201 227 +26
Lines 22488 26551 +4063
Branches 0 988 +988
============================================
+ Hits 17857 20701 +2844
- Misses 4631 5324 +693
- Partials 0 526 +526
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 26 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
17f3a13 to
b5e4ec2
Compare
4f72426 to
bc1fa68
Compare
BenchmarksBenchmark execution time: 2024-06-07 21:43:42 Comparing candidate commit fa07162 in PR branch Found 6 performance improvements and 0 performance regressions! Performance is the same for 172 metrics, 0 unstable metrics. scenario:ComposerTelemetryBench/benchTelemetryParsing
scenario:ComposerTelemetryBench/benchTelemetryParsing-opcache
scenario:ContextPropagationBench/benchInject64Bit
scenario:ContextPropagationBench/benchInject64Bit-opcache
scenario:EmptyFileBench/benchEmptyFileBaseline-opcache
scenario:MessagePackSerializationBench/benchMessagePackSerialization
|
96cde75 to
0344bb0
Compare
| get_global_DD_TRACE_AGENT_STACK_BACKLOG()); | ||
| } | ||
| #endif | ||
|
|
There was a problem hiding this comment.
The code paths are just to complicated for my brain, but why is it safe to move this code to dd_activate_once?
There was a problem hiding this comment.
Background sender thread is only actually needed once spans may actually be flushed. And that never happens before dd_activate_once.
| #endif | ||
|
|
||
| #ifndef _WIN32 | ||
| void disable_sidecar_sending(void); |
There was a problem hiding this comment.
nitpick: this function does not seem to be used elsewhere but in ddtrace.c. So you could declare it before its usage (+ make it static) and remove the declaration from here
| --TEST-- | ||
| Sidecar should be enabled by default on PHP 8.3 | ||
| --SKIPIF-- | ||
| <?php include 'startup_logging_skipif_unix_83.inc'; ?> |
There was a problem hiding this comment.
The name is a bit confusing. What about startup_logging_skip_unless_unix_83?
Also, what about moving the files to the includes directory
0344bb0 to
46ca434
Compare
90f1fef to
c4d648a
Compare
Signed-off-by: Bob Weinand <[email protected]>
Signed-off-by: Bob Weinand <[email protected]>
Signed-off-by: Bob Weinand <[email protected]>
Signed-off-by: Bob Weinand <[email protected]>
Signed-off-by: Bob Weinand <[email protected]>
Signed-off-by: Bob Weinand <[email protected]>
Signed-off-by: Bob Weinand <[email protected]>
Signed-off-by: Bob Weinand <[email protected]>
Signed-off-by: Bob Weinand <[email protected]>
Manually set sidecar sender config. Signed-off-by: Bob Weinand <[email protected]>
c4d648a to
446a704
Compare
Signed-off-by: Bob Weinand <[email protected]>
446a704 to
a0edcc0
Compare
pierotibou
left a comment
There was a problem hiding this comment.
Cannot approve my own PR (even though, it's clearly not my PR anymore :p)
Overall LGTM, I just have a few questions. Also realizing that the sidecar sets _top_level I would have rather not if not agentless.
| $rootTraceAssertion = function ($i) { | ||
| return SpanAssertion::exists("do_manual_instrumentation_within_root_trace_function", "run $i") | ||
| ->withChildren([ | ||
| SpanAssertion::exists("first-sub-operation")->withChildren( |
There was a problem hiding this comment.
I don't get why those have changed
There was a problem hiding this comment.
normalization changes. Do you want to revert it?
There was a problem hiding this comment.
I'd rather not mess around unnecessarily by now.
| } | ||
| if (isset($spanMetrics["_top_level"])) { | ||
| // Set by sidecar only | ||
| unset($spanMetrics['_top_level']); |
There was a problem hiding this comment.
The sidecar, if not agentless, shouldn't set, for the sake of consistency with the other tracers.
There was a problem hiding this comment.
Uh, I thought _top_level is an attribute of partial flushing anyway - e.g. java is setting it: https://github.com/DataDog/dd-trace-java/blob/fff0006e3844272fc7bc711117b15dfd87a8feee/dd-trace-core/src/main/java/datadog/trace/common/writer/ddagent/TraceMapperV0_5.java#L258
There was a problem hiding this comment.
Java is setting _dd.top_level, this is one set only by the agent
Signed-off-by: Bob Weinand <[email protected]>
fa07162 to
1085733
Compare
bwoebi
left a comment
There was a problem hiding this comment.
As Pierre cannot self-approve :-)
This reverts commit c5f2dcb.
* Enable sidecar by default, only when telemetry is enabled * Manually set sidecar config to false Signed-off-by: Bob Weinand <[email protected]> * minor comments in the tests * add a test to make sure sidecar is enabled by default in 8.3 * Delay bgs initialization until sidecar sender status is finalized Signed-off-by: Bob Weinand <[email protected]> * Fix crash Signed-off-by: Bob Weinand <[email protected]> * Add telemetry for telemetry disabled Signed-off-by: Bob Weinand <[email protected]> * Fix mem leak Signed-off-by: Bob Weinand <[email protected]> * Hack to massage sidecar v0.7 into what is expected by tests Signed-off-by: Bob Weinand <[email protected]> * Fix telemetry path Signed-off-by: Bob Weinand <[email protected]> * More test stability Signed-off-by: Bob Weinand <[email protected]> * Fix header name * Update libdatadog * Test fixes Signed-off-by: Bob Weinand <[email protected]> * In the agent sampling test, telemetry conflicts with sidecar Manually set sidecar sender config. Signed-off-by: Bob Weinand <[email protected]> * Avoid parseMultipleRequestsFromDumpedData with sidecar * Skip valgrind test Signed-off-by: Bob Weinand <[email protected]> * Turn sidecar sender off in valgrind tests because of false positives Signed-off-by: Bob Weinand <[email protected]> --------- Signed-off-by: Bob Weinand <[email protected]> Co-authored-by: Bob Weinand <[email protected]> Co-authored-by: Björn Antonsson <[email protected]> Co-authored-by: Luc Vieillescazes <[email protected]>
Description
This PR enables sending traces on Unix through the sidecar by default in PHP 8.3.
This will thus impact 5% of our customers.
If the customer has explicitly disabled telemetry (thus the sidecar), we need to fallback to the background zender.
This is tested through unit tests on config logging.
APMSP-1154
Reviewer checklist