Skip to content

Commit 505623f

Browse files
pierotibouhoolioh
andauthored
Enable sidecar on 8.3 (#2716)
* Revert "Disable sidecar on 8.3 (#2700)" This reverts commit d943c71. * Use sidecar with v0.4 encoding support. * Prevent running the sidecar in the background sender test. * Increase request attempt number in order to avoid flakyness when sidecar is enabled. --------- Co-authored-by: Julio Gonzalez <[email protected]>
1 parent 19670e2 commit 505623f

9 files changed

+7
-13
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ define run_composer_with_retry
985985
endef
986986

987987
define run_tests_without_coverage
988-
$(TEST_EXTRA_ENV) $(ENV_OVERRIDE) php $(TEST_EXTRA_INI) -d datadog.instrumentation_telemetry_enabled=0 -d datadog.trace.sidecar_trace_sender=$(shell test $(PHP_MAJOR_MINOR) -ge 84 && echo 1 || echo 0) $(TRACER_SOURCES_INI) $(PHPUNIT) $(1) --filter=$(FILTER)
988+
$(TEST_EXTRA_ENV) $(ENV_OVERRIDE) php $(TEST_EXTRA_INI) -d datadog.instrumentation_telemetry_enabled=0 -d datadog.trace.sidecar_trace_sender=$(shell test $(PHP_MAJOR_MINOR) -ge 83 && echo 1 || echo 0) $(TRACER_SOURCES_INI) $(PHPUNIT) $(1) --filter=$(FILTER)
989989
endef
990990

991991
define run_tests_with_coverage

ext/configuration.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ enum ddtrace_sampling_rules_format {
5353
#define DD_INTEGRATION_ANALYTICS_ENABLED_DEFAULT false
5454
#define DD_INTEGRATION_ANALYTICS_SAMPLE_RATE_DEFAULT 1
5555

56-
#if defined(_WIN32)
56+
#if PHP_VERSION_ID >= 80300 || defined(_WIN32)
5757
#define DD_SIDECAR_TRACE_SENDER_DEFAULT true
5858
#else
5959
#define DD_SIDECAR_TRACE_SENDER_DEFAULT false

libdatadog

Submodule libdatadog updated 56 files

tests/Common/TracerTestTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ public function retrieveDumpedData(callable $until = null, $throw = false)
441441
// When tests run with the background sender enabled, there might be some delay between when a trace is flushed
442442
// and actually sent. While we should find a smart way to tackle this, for now we do it quick and dirty, in a
443443
// for loop.
444-
for ($attemptNumber = 1; $attemptNumber <= 20; $attemptNumber++) {
444+
for ($attemptNumber = 1; $attemptNumber <= 50; $attemptNumber++) {
445445
$curl = curl_init(self::$agentRequestDumperUrl . '/replay');
446446
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
447447
// Retrieving data

tests/Integrations/Custom/Autoloaded/BackgroundSenderLogTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ private static function getAppErrorLog()
2424
protected static function getEnvs()
2525
{
2626
return array_merge(parent::getEnvs(), [
27+
'DD_TRACE_SIDECAR_TRACE_SENDER' => false,
2728
'DD_TRACE_DEBUG_CURL_OUTPUT' => true,
2829
'DD_TRACE_AGENT_FLUSH_INTERVAL' => self::BGS_FLUSH_INTERVAL_MS,
2930
]);

tests/ext/background-sender/sidecar_fallback.phpt

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Send telemetry about the sidecar being disabled
33
--SKIPIF--
44
<?php include __DIR__ . '/../includes/skipif_no_dev_env.inc'; ?>
5-
<?php die('skip: Sidecar is nowhere enabled by default yet.'); ?>
65
<?php if (PHP_VERSION_ID < 80300) die('skip: Sidecar fallback exists only on PHP 8.3'); ?>
76
<?php if (strncasecmp(PHP_OS, "WIN", 3) == 0) die('skip: There is no background sender on Windows'); ?>
87
<?php if (getenv('USE_ZEND_ALLOC') === '0' && !getenv("SKIP_ASAN")) die('skip: valgrind reports sendmsg(msg.msg_control) points to uninitialised byte(s), but it is unproblematic and outside our control in rust code'); ?>

tests/ext/sidecar_disabled_when_telemetry_disabled.phpt

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ Sidecar should be disabled when telemetry is disabled
66
<?php
77
include_once 'startup_logging.inc';
88

9-
// This test isn't relevant now as we're not enabling sidecar on 8.3.
10-
// It is still working so I'll leave it here as a commodity.
11-
129
// IN PHP 8.3, the sidecar is enabled
1310
// In all other versions the sidecar is disabled.
1411
// But we disable in all cases if telemetry is disabled.

tests/ext/sidecar_enabled.phpt

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
--TEST--
22
Sidecar should be enabled by default on PHP 8.3
33
--SKIPIF--
4-
<?php include 'startup_logging_skip_unless_unix_83.inc'; ?>
4+
<?php include 'startup_logging_skipif_unix_83.inc'; ?>
55
--FILE--
66
<?php
77
include_once 'startup_logging.inc';
88

9-
// This test isn't relevant now as we're not enabling sidecar on 8.3.
10-
// I'll leave it here as a commodity.
11-
129
// IN PHP 8.3, the sidecar is enabled by default, let's test this here
1310
// In all other versions the sidecar is disabled but this is tested by sidecar_disabled_when_telemetry_disabled.phpt
1411
$logs = dd_get_startup_logs([], [
@@ -21,4 +18,4 @@ dd_dump_startup_logs($logs, [
2118

2219
?>
2320
--EXPECT--
24-
sidecar_trace_sender: false
21+
sidecar_trace_sender: true

0 commit comments

Comments
 (0)