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

Enable sidecar on 8.3 #2716

Merged
merged 4 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ define run_composer_with_retry
endef

define run_tests_without_coverage
$(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)
$(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)
endef

define run_tests_with_coverage
Expand Down
2 changes: 1 addition & 1 deletion ext/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum ddtrace_sampling_rules_format {
#define DD_INTEGRATION_ANALYTICS_ENABLED_DEFAULT false
#define DD_INTEGRATION_ANALYTICS_SAMPLE_RATE_DEFAULT 1

#if defined(_WIN32)
#if PHP_VERSION_ID >= 80300 || defined(_WIN32)
#define DD_SIDECAR_TRACE_SENDER_DEFAULT true
#else
#define DD_SIDECAR_TRACE_SENDER_DEFAULT false
Expand Down
1 change: 0 additions & 1 deletion tests/ext/background-sender/sidecar_fallback.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Send telemetry about the sidecar being disabled
--SKIPIF--
<?php include __DIR__ . '/../includes/skipif_no_dev_env.inc'; ?>
<?php die('skip: Sidecar is nowhere enabled by default yet.'); ?>
<?php if (PHP_VERSION_ID < 80300) die('skip: Sidecar fallback exists only on PHP 8.3'); ?>
<?php if (strncasecmp(PHP_OS, "WIN", 3) == 0) die('skip: There is no background sender on Windows'); ?>
<?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'); ?>
Expand Down
3 changes: 0 additions & 3 deletions tests/ext/sidecar_disabled_when_telemetry_disabled.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ Sidecar should be disabled when telemetry is disabled
<?php
include_once 'startup_logging.inc';

// This test isn't relevant now as we're not enabling sidecar on 8.3.
// It is still working so I'll leave it here as a commodity.

// IN PHP 8.3, the sidecar is enabled
// In all other versions the sidecar is disabled.
// But we disable in all cases if telemetry is disabled.
Expand Down
7 changes: 2 additions & 5 deletions tests/ext/sidecar_enabled.phpt
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
--TEST--
Sidecar should be enabled by default on PHP 8.3
--SKIPIF--
<?php include 'startup_logging_skip_unless_unix_83.inc'; ?>
<?php include 'startup_logging_skipif_unix_83.inc'; ?>
--FILE--
<?php
include_once 'startup_logging.inc';

// This test isn't relevant now as we're not enabling sidecar on 8.3.
// I'll leave it here as a commodity.

// IN PHP 8.3, the sidecar is enabled by default, let's test this here
// In all other versions the sidecar is disabled but this is tested by sidecar_disabled_when_telemetry_disabled.phpt
$logs = dd_get_startup_logs([], [
Expand All @@ -21,4 +18,4 @@ dd_dump_startup_logs($logs, [

?>
--EXPECT--
sidecar_trace_sender: false
sidecar_trace_sender: true
Loading