Skip to content

Commit 129707f

Browse files
committed
Update to newest libdatadog
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
1 parent 1d209f3 commit 129707f

7 files changed

Lines changed: 15 additions & 26 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ RUN_TESTS_CMD := DD_SERVICE= DD_ENV= REPORT_EXIT_STATUS=1 TEST_PHP_SRCDIR=$(PROJ
4848

4949
C_FILES = $(shell find components components-rs ext src/dogstatsd zend_abstract_interface -name '*.c' -o -name '*.h' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
5050
TEST_FILES = $(shell find tests/ext -name '*.php*' -o -name '*.inc' -o -name '*.json' -o -name '*.yaml' -o -name 'CONFLICTS' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
51-
RUST_FILES = $(BUILD_DIR)/Cargo.toml $(BUILD_DIR)/Cargo.lock $(shell find components-rs -name '*.c' -o -name '*.rs' -o -name 'Cargo.toml' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' ) $(shell find libdatadog/{build-common,datadog-ffe,datadog-ipc,datadog-ipc-macros,datadog-live-debugger,datadog-live-debugger-ffi,datadog-remote-config,datadog-sidecar,datadog-sidecar-ffi,datadog-sidecar-macros,libdd-alloc,libdd-capabilities,libdd-capabilities-impl,libdd-common,libdd-common-ffi,libdd-crashtracker,libdd-crashtracker-ffi,libdd-data-pipeline,libdd-ddsketch,libdd-dogstatsd-client,libdd-library-config,libdd-library-config-ffi,libdd-log,libdd-libunwind-sys,libdd-shared-runtime,libdd-telemetry,libdd-telemetry-ffi,libdd-tinybytes,libdd-trace-*,spawn_worker,tools/{cc_utils,sidecar_mockgen},libdd-trace-*,Cargo.toml} \( -type l -o -type f \) \( -path "*/src*" -o -path "*/examples*" -o -path "*/libdd-libunwind-sys*" -o -path "*Cargo.toml" -o -path "*/build.rs" -o -path "*/tests/dataservice.rs" -o -path "*/tests/service_functional.rs" \) -not -path "*/datadog-ipc/build.rs" -not -path "*/datadog-sidecar-ffi/build.rs")
51+
RUST_FILES = $(BUILD_DIR)/Cargo.toml $(BUILD_DIR)/Cargo.lock $(shell find components-rs -name '*.c' -o -name '*.rs' -o -name 'Cargo.toml' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' ) $(shell find libdatadog/{build-common,datadog-ffe,datadog-ipc,datadog-ipc-macros,datadog-live-debugger,datadog-live-debugger-ffi,datadog-remote-config,datadog-sidecar,datadog-sidecar-ffi,datadog-sidecar-macros,libdd-alloc,libdd-capabilities,libdd-capabilities-impl,libdd-common,libdd-common-ffi,libdd-crashtracker,libdd-crashtracker-ffi,libdd-data-pipeline,libdd-ddsketch,libdd-dogstatsd-client,libdd-library-config,libdd-library-config-ffi,libdd-log,libdd-shared-runtime,libdd-telemetry,libdd-telemetry-ffi,libdd-tinybytes,libdd-trace-*,spawn_worker,tools/{cc_utils,sidecar_mockgen},libdd-trace-*,Cargo.toml} \( -type l -o -type f \) \( -path "*/src*" -o -path "*/examples*" -o -path "*Cargo.toml" -o -path "*/build.rs" -o -path "*/tests/dataservice.rs" -o -path "*/tests/service_functional.rs" \) -not -path "*/datadog-ipc/build.rs" -not -path "*/datadog-sidecar-ffi/build.rs")
5252
ALL_OBJECT_FILES = $(C_FILES) $(RUST_FILES) $(BUILD_DIR)/Makefile
5353
TEST_OPCACHE_FILES = $(shell find tests/opcache -name '*.php*' -o -name '.gitkeep' | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )
5454
TEST_STUB_FILES = $(shell find tests/ext -type d -name 'stubs' -exec find '{}' -type f \; | awk '{ printf "$(BUILD_DIR)/%s\n", $$1 }' )

components-rs/ddtrace.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ void ddog_apply_agent_info(struct ddog_AgentInfoReader *reader,
8585
*/
8686
void ddog_apply_agent_info_concentrator_config(struct ddog_AgentInfoReader *reader);
8787

88-
/**
89-
* Returns true once the sidecar has received and applied the agent /info response.
90-
* Used by `dd_trace_internal_fn('await_agent_info')` to block until the concentrator
91-
* peer-tag keys and span kinds are initialised.
92-
*/
93-
bool ddog_is_agent_info_ready(void);
94-
9588
bool ddog_shall_log(enum ddog_Log category);
9689

9790
void ddog_set_error_log_level(bool once);
@@ -183,6 +176,13 @@ bool ddog_exception_hash_limiter_inc(struct ddog_SidecarTransport *connection,
183176
uint64_t hash,
184177
uint32_t granularity_seconds);
185178

179+
/**
180+
* Returns true once the agent /info has been received and applied.
181+
* Used by the PHP extension to skip stats computation until the concentrator
182+
* has been properly initialised with peer-tag keys and span kinds.
183+
*/
184+
bool ddog_is_agent_info_ready(void);
185+
186186
/**
187187
* Look up (or lazily create) the concentrator for `(env, version, service)` and invoke
188188
* `callback` with a shared reference to it while holding the global read lock.

components-rs/live-debugger.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#include <stdio.h>
1111
#include "common.h"
1212

13-
void drop_log_probe_capture_expressions(struct ddog_LogProbe);
13+
void ddog_drop_log_probe_capture_expressions(struct ddog_LogProbe);
1414

15-
void drop_span_decoration_probe(struct ddog_SpanDecorationProbe);
15+
void ddog_drop_span_decoration_probe(struct ddog_SpanDecorationProbe);
1616

1717
struct ddog_CaptureConfiguration ddog_capture_defaults(void);
1818

config.m4

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,6 @@ if test "$PHP_DDTRACE" != "no"; then
6565
PHP_SUBST(DDTRACE_CARGO)
6666
fi
6767

68-
dnl As required by libdd-libunwind-sys
69-
if test "$PHP_DDTRACE_RUST_LIBRARY" = "-"; then
70-
AC_CHECK_TOOL(DDTRACE_AUTOMAKE, automake, [:])
71-
AS_IF([test "$DDTRACE_AUTOMAKE" = ":"], [AC_MSG_ERROR([Please install automake before configuring])])
72-
AC_CHECK_TOOL(DDTRACE_LIBTOOL, libtool, [:])
73-
AS_IF([test "$DDTRACE_LIBTOOL" = ":"], [
74-
AC_CHECK_TOOL(DDTRACE_LIBTOOLIZE, libtoolize, [:])
75-
AS_IF([test "$DDTRACE_LIBTOOLIZE" = ":"], [
76-
AC_MSG_ERROR([Please install libtool before configuring])
77-
])
78-
])
79-
fi
80-
8168
if test "$PHP_DDTRACE_SANITIZE" != "no"; then
8269
dnl gcc needs -lasan, clang needs -shared-libsan
8370
ac_cflags=$LDFLAGS

ext/live_debugger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ static bool dd_probe_file_mismatch(dd_probe_def *def, zend_execute_data *execute
128128
static void dd_probe_dtor(void *data) {
129129
dd_probe_def *def = data;
130130
if (def->probe.probe.tag == DDOG_PROBE_TYPE_SPAN_DECORATION) {
131-
drop_span_decoration_probe(def->probe.probe.span_decoration);
131+
ddog_drop_span_decoration_probe(def->probe.probe.span_decoration);
132132
} else if (def->probe.probe.tag == DDOG_PROBE_TYPE_LOG) {
133-
drop_log_probe_capture_expressions(def->probe.probe.log);
133+
ddog_drop_log_probe_capture_expressions(def->probe.probe.log);
134134
}
135135
if (def->file) {
136136
zend_string_release(def->file);

0 commit comments

Comments
 (0)